WP_Icons_Registry::get_registered_icon( string $icon_name ): array|null

In this article

Retrieves an array containing the properties of a registered icon.

Parameters

$icon_namestringrequired
Icon name including namespace.

Return

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

Source

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;
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.