WPSEO_Utils::is_metabox_active()
Determines whether the metabox is active for the given identifier and type.
Метод класса: WPSEO_Utils{}
Хуков нет.
Возвращает
true|false
. Whether or not the metabox is active.
Использование
$result = WPSEO_Utils::is_metabox_active( $identifier, $type );
- $identifier(строка) (обязательный)
- The identifier to check for.
- $type(строка) (обязательный)
- The type to check for.
Код WPSEO_Utils::is_metabox_active() WPSEO Utils::is metabox active Yoast 24.9
public static function is_metabox_active( $identifier, $type ) { if ( $type === 'post_type' ) { return self::display_post_type_metabox( $identifier ); } if ( $type === 'taxonomy' ) { return self::display_taxonomy_metabox( $identifier ); } return false; }