WP_Icons_Registry::get_registered_iconpublicWP 1.0

Retrieves an array containing the properties of a registered icon.

Method of the class: WP_Icons_Registry{}

No Hooks.

Returns

Array|null. Registered icon properties or null if the icon is not registered.

Usage

$WP_Icons_Registry = new WP_Icons_Registry();
$WP_Icons_Registry->get_registered_icon( $icon_name );
$icon_name(string) (required)
Icon name including namespace.

WP_Icons_Registry::get_registered_icon() code WP 7.0

public function get_registered_icon( $icon_name ) {
	if ( ! $this->is_registered( $icon_name ) ) {
		return null;
	}

	$icon            = $this->registered_icons[ $icon_name ];
	$icon['content'] = $icon['content'] ?? $this->get_content( $icon_name );

	return $icon;
}