WP_Dependencies::get_data

Advertisement

Summery Summery

Get extra item data.

Syntax Syntax

WP_Dependencies::get_data( string $handle, string $key )

Description Description

Gets data associated with a registered item.

Parameters Parameters

$handle

(string) (Required) Name of the item. Should be unique.

$key

(string) (Required) The data key.

Return Return

(mixed) Extra item data (string), false otherwise.

Source Source

File: wp-includes/class.wp-dependencies.php

	 * @param string $key    The data key.
	 * @return mixed Extra item data (string), false otherwise.
	 */
	public function get_data( $handle, $key ) {
		if ( ! isset( $this->registered[ $handle ] ) ) {
			return false;
		}

		if ( ! isset( $this->registered[ $handle ]->extra[ $key ] ) ) {
			return false;
		}

Advertisement

Changelog Changelog

Changelog
Version Description
3.3.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.