WPSEO_Option::is_disabled
Checks whether a specific option key is disabled.
This is determined by whether an override option is available with a key that equals the given key prefixed with 'allow_'.
Метод класса: WPSEO_Option{}
Хуков нет.
Возвращает
true|false. True if option key is disabled, false otherwise.
Использование
$WPSEO_Option = new WPSEO_Option(); $WPSEO_Option->is_disabled( $key );
- $key(строка) (обязательный)
- Option key.
Код WPSEO_Option::is_disabled() WPSEO Option::is disabled Yoast 26.7
public function is_disabled( $key ) {
$override_option = $this->get_override_option();
if ( empty( $override_option ) ) {
return false;
}
return isset( $override_option[ self::ALLOW_KEY_PREFIX . $key ] ) && ! $override_option[ self::ALLOW_KEY_PREFIX . $key ];
}