WPSEO_Option_Wpseo::__construct()
Add the actions and filters for the option.
Метод класса: WPSEO_Option_Wpseo{}
Хуки из метода
Возвращает
null
. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->__construct();
Код WPSEO_Option_Wpseo::__construct() WPSEO Option Wpseo:: construct Yoast 24.9
protected function __construct() { parent::__construct(); /** * Filter: 'wpseo_enable_tracking' - Enables the data tracking of Yoast SEO Premium. * * @param string|false $is_enabled The enabled state. Default is false. */ $this->defaults['tracking'] = apply_filters( 'wpseo_enable_tracking', false ); /* Clear the cache on update/add. */ add_action( 'add_option_' . $this->option_name, [ 'WPSEO_Utils', 'clear_cache' ] ); add_action( 'update_option_' . $this->option_name, [ 'WPSEO_Utils', 'clear_cache' ] ); add_filter( 'admin_title', [ 'Yoast_Input_Validation', 'add_yoast_admin_document_title_errors' ] ); /** * Filter the `wpseo` option defaults. * * @param array $defaults Array the defaults for the `wpseo` option attributes. */ $this->defaults = apply_filters( 'wpseo_option_wpseo_defaults', $this->defaults ); }