示例#1
0
 /**
  * Initiate module
  *
  * @since  2.0
  * @return void
  */
 public function initiate()
 {
     parent::initiate();
     add_action('transition_post_status', array(&$this, 'post_ancestry_check'), 10, 3);
     foreach ($this->_post_types()->get_all() as $post_type) {
         add_action('wp_ajax_wpca/module/' . $this->id . '-' . $post_type->name, array($this, 'ajax_print_content'));
     }
 }
 public function initiate()
 {
     parent::initiate();
     add_action('created_term', array($this, 'term_ancestry_check'), 10, 3);
     foreach ($this->_get_taxonomies() as $taxonomy) {
         add_action('wp_ajax_wpca/module/' . $this->id . '-' . $taxonomy->name, array($this, 'ajax_print_content'));
     }
 }
 public function initiate()
 {
     parent::initiate();
     if (is_admin()) {
         global $q_config;
         //Disable multilanguage
         if (is_array($q_config["post_type_excluded"])) {
             foreach (WPCACore::post_types()->get_all() as $name => $post_type) {
                 $q_config["post_type_excluded"][] = $name;
             }
             $q_config["post_type_excluded"][] = WPCACore::TYPE_CONDITION_GROUP;
         }
     }
 }
 public function initiate()
 {
     parent::initiate();
     add_filter('pll_get_post_types', array($this, 'remove_sidebar_multilingual'));
 }
示例#5
0
 /**
  * Initiate module
  *
  * @since  2.0
  * @return void
  */
 public function initiate()
 {
     parent::initiate();
     add_filter('wpca/module/static/in-context', array($this, 'static_is_content'));
 }