WPSEO_Utils::is_metabox_active │ public static │ Yoast 1.0

Determines whether the metabox is active for the given identifier and type.

Метод класса: WPSEO_Utils{}

Хуков нет.

Возвращает

bool. 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() Yoast 28.7

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