WP_Icons_Registry::unregister
Unregisters an icon.
Метод класса: WP_Icons_Registry{}
Хуков нет.
Возвращает
bool. True if the icon was unregistered successfully, false otherwise.
Использование
$WP_Icons_Registry = new WP_Icons_Registry(); $WP_Icons_Registry->unregister( $icon_name );
- $icon_name(строка) (обязательный)
- Namespaced icon name in the form "collection/icon-name" (e.g. "core/arrow-left").
Список изменений
| С версии 7.1.0 | Введена. |
Код WP_Icons_Registry::unregister() WP Icons Registry::unregister WP 7.1.2
public function unregister( $icon_name ) {
if ( ! $this->is_registered( $icon_name ) ) {
_doing_it_wrong(
__METHOD__,
sprintf(
/* translators: %s: Icon name. */
__( 'Icon "%s" is not registered.' ),
$icon_name
),
'7.1.0'
);
return false;
}
unset( $this->registered_icons[ $icon_name ] );
return true;
}