/** * Constructor */ public function __construct() { parent::__construct('post_type', __('Post Types', WPCACore::DOMAIN), true); $this->type_display = true; $this->searchable = true; add_action('transition_post_status', array(&$this, 'post_ancestry_check'), 10, 3); }
/** * Constructor */ public function __construct() { parent::__construct('page_template', __('Page Templates', WPCACore::DOMAIN)); $this->type_display = true; $this->placeholder = __("All Templates", WPCACore::DOMAIN); $this->default_value = $this->id; }
/** * 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; } } }
/** * Constructor */ public function __construct() { parent::__construct('language', __('Languages', WPCACore::DOMAIN)); }
/** * Constructor */ public function __construct() { parent::__construct('static', __('Static Pages', WPCACore::DOMAIN)); $this->type_display = false; }
/** * Save data on POST * * @since 1.0 * @param int $post_id * @return void */ public function save_data($post_id) { parent::save_data($post_id); $tax_input = isset($_POST['cas_condition']['tax_input']) ? $_POST['cas_condition']['tax_input'] : array(); //Save terms //Loop through each public taxonomy foreach ($this->_get_taxonomies() as $taxonomy) { if (current_user_can($taxonomy->cap->assign_terms)) { //If no terms, maybe delete old ones if (!isset($tax_input[$taxonomy->name])) { $terms = null; } else { $terms = $tax_input[$taxonomy->name]; //Hierarchical taxonomies use ids instead of slugs //see http://codex.wordpress.org/Function_Reference/wp_set_post_terms if ($taxonomy->hierarchical) { $terms = array_unique(array_map('intval', $terms)); } } wp_set_object_terms($post_id, $terms, $taxonomy->name); } } }
/** * Constructor */ public function __construct() { parent::__construct('author', __('Authors', WPCACore::DOMAIN)); $this->type_display = true; }
/** * Constructor */ public function __construct() { parent::__construct('page_template', __('Page Templates', WPCACore::DOMAIN)); $this->type_display = true; }
/** * Constructor */ public function __construct() { parent::__construct('date', __('Dates', WPCACore::DOMAIN)); }
/** * Constructor */ public function __construct() { parent::__construct('bp_member', __('BuddyPress Members', WPCACore::DOMAIN)); add_filter('wpca/module/static/in-context', array(&$this, 'static_is_content')); }
/** * Constructor */ public function __construct() { parent::__construct('language', __('Languages', WPCACore::DOMAIN)); add_filter('pll_get_post_types', array(&$this, 'remove_sidebar_multilingual')); }
public function initiate() { parent::initiate(); add_filter('pll_get_post_types', array($this, 'remove_sidebar_multilingual')); }
/** * Initiate module * * @since 2.0 * @return void */ public function initiate() { parent::initiate(); add_filter('wpca/module/static/in-context', array($this, 'static_is_content')); }