Пример #1
0
 /**
  * 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 \YMBESEO_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('YMBESEO_Utils', 'flush_w3tc_cache'));
     add_action('update_option_' . $this->option_name, array('YMBESEO_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 \YMBESEO_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('YMBESEO_Utils', 'clear_cache'));
     add_action('update_option_' . $this->option_name, array('YMBESEO_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 \YMBESEO_Option_Titles
  */
 protected function __construct()
 {
     parent::__construct();
     add_action('update_option_' . $this->option_name, array('YMBESEO_Utils', 'clear_cache'));
     add_action('init', array($this, 'end_of_init'), 999);
 }
 /**
  * Only run parent constructor in multisite context.
  */
 public function __construct()
 {
     if (is_multisite()) {
         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 \YMBESEO_Option_XML
  */
 protected function __construct()
 {
     parent::__construct();
     add_action('update_option_' . $this->option_name, array('YMBESEO_Utils', 'clear_rewrites'));
     add_action('update_option_' . $this->option_name, array('YMBESEO_Utils', 'clear_sitemap_cache'));
 }