/** * Add the actions and filters for the option * * @todo [JRF => testers] Check if the extra actions below would run into problems if an option * is updated early on and if so, change the call to schedule these for a later action on add/update * instead of running them straight away * * @return \WPSEO_Taxonomy_Meta */ protected function __construct() { parent::__construct(); /* On succesfull update/add of the option, flush the W3TC cache */ add_action('add_option_' . $this->option_name, array('WPSEO_Utils', 'flush_w3tc_cache')); add_action('update_option_' . $this->option_name, array('WPSEO_Utils', 'flush_w3tc_cache')); }
/** * Add the actions and filters for the option * * @todo [JRF => testers] Check if the extra actions below would run into problems if an option * is updated early on and if so, change the call to schedule these for a later action on add/update * instead of running them straight away * * @return \WPSEO_Option_Wpseo */ protected function __construct() { parent::__construct(); /* Clear the cache on update/add */ add_action('add_option_' . $this->option_name, array('WPSEO_Utils', 'clear_cache')); add_action('update_option_' . $this->option_name, array('WPSEO_Utils', 'clear_cache')); }
/** * Add the actions and filters for the option * * @todo [JRF => testers] Check if the extra actions below would run into problems if an option * is updated early on and if so, change the call to schedule these for a later action on add/update * instead of running them straight away * * @return \WPSEO_Option_Wpseo */ protected function __construct() { parent::__construct(); /* Clear the cache on update/add */ add_action('add_option_' . $this->option_name, array('WPSEO_Utils', 'clear_cache')); add_action('update_option_' . $this->option_name, array('WPSEO_Utils', 'clear_cache')); /** * 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); }
/** * Add the actions and filters for the option * * @todo [JRF => testers] Check if the extra actions below would run into problems if an option * is updated early on and if so, change the call to schedule these for a later action on add/update * instead of running them straight away * * @return \WPSEO_Option_Wpseo */ protected function __construct() { /* Dirty fix for making certain defaults available during activation while still only defining them once */ foreach (self::$desc_defaults as $key => $value) { $this->defaults[$key] = $value; } parent::__construct(); /* Clear the cache on update/add */ add_action('add_option_' . $this->option_name, array('WPSEO_Utils', 'clear_cache')); add_action('update_option_' . $this->option_name, array('WPSEO_Utils', 'clear_cache')); }
/** * Add the actions and filters for the option * * @return \WPSEO_Option_Woo */ protected function __construct() { parent::__construct(); // Set and translate the valid data types $this->valid_data_types = array('price' => __('Price', 'yoast-woo-seo'), 'stock' => __('Stock', 'yoast-woo-seo')); }
/** * Only run parent constructor in multisite context. */ public function __construct() { if (is_multisite()) { parent::__construct(); } }
/** * Add the actions and filters for the option * * @return \WPSEO_Option_Video */ protected function __construct() { parent::__construct(); }
/** * Add the actions and filters for the option * * @todo [JRF => testers] Check if the extra actions below would run into problems if an option * is updated early on and if so, change the call to schedule these for a later action on add/update * instead of running them straight away * * @return \WPSEO_Option_Titles */ protected function __construct() { parent::__construct(); add_action('update_option_' . $this->option_name, array('WPSEO_Utils', 'clear_cache')); add_action('init', array($this, 'end_of_init'), 999); }
/** * Add the actions and filters for the option * * @todo [JRF => testers] Check if the extra actions below would run into problems if an option * is updated early on and if so, change the call to schedule these for a later action on add/update * instead of running them straight away * * @return \WPSEO_Option_XML */ protected function __construct() { parent::__construct(); add_action('update_option_' . $this->option_name, array('WPSEO_Utils', 'clear_rewrites')); add_action('update_option_' . $this->option_name, array('WPSEO_Sitemaps_Cache', 'clear')); }