WP_Icons_Registry::get_registered_icon
Retrieves an array containing the properties of a registered icon.
Метод класса: WP_Icons_Registry{}
Хуков нет.
Возвращает
array|null. Registered icon properties or null if the icon is not registered.
Использование
$WP_Icons_Registry = new WP_Icons_Registry(); $WP_Icons_Registry->get_registered_icon( $icon_name );
- $icon_name(строка) (обязательный)
- Icon name including namespace.
Список изменений
| С версии 7.0.0 | Введена. |
Код WP_Icons_Registry::get_registered_icon() WP Icons Registry::get registered icon WP 7.1.2
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;
}