/** * Displays notices. * * @return void */ function notices() { $post = get_queried_object(); if ($post->post_status == 'pending') { if (cp_have_pending_payment($post->ID)) { appthemes_display_notice('warning', __('This ad listing is currently pending and awaiting payment.', APP_TD)); } else { appthemes_display_notice('warning', __('This ad listing is currently pending and must be approved by an administrator.', APP_TD)); } } else { if ($post->post_status == 'draft') { $expire_time = strtotime(get_post_meta($post->ID, 'cp_sys_expire_date', true)); if (current_time('timestamp') > $expire_time) { appthemes_display_notice('success', __('This ad listing is expired.', APP_TD)); } else { appthemes_display_notice('success', __('This ad listing is paused.', APP_TD)); } } } parent::notices(); }
function __construct($template, $default_title, $hidden_features = array()) { $this->template = $template; $this->default_title = $default_title; $this->hidden_features = wp_parse_args($hidden_features, array('hide_description' => false, 'hide_post_image' => false, 'hide_comment_status' => false, 'hide_comments' => false, 'hide_post_custom' => false, 'hide_slug' => false, 'hide_author' => false, 'hide_page_parent' => false, 'hide_page_template' => false, 'hide_page_order' => false, 'internal_use_only' => false)); self::$instances[get_class($this)] = $this; parent::__construct(); }
function __construct($template, $default_title) { $this->template = $template; $this->default_title = $default_title; self::$instances[get_class($this)] = $this; parent::__construct(); }
function __construct() { add_filter('appthemes_disable_order_summary_template', '__return_true'); parent::__construct(); }
public function __construct($template, $default_title) { $this->template = (array) $template; $this->default_title = $default_title; self::$registry[$this->get_template()] = $this; // DEPRECATED self::$instances[get_class($this)] = $this; if (is_admin()) { // add new (undefined) templates to the list of available add_filter('quick_edit_dropdown_pages_args', array(__CLASS__, '_register_new_templates')); add_filter('page_attributes_dropdown_pages_args', array(__CLASS__, '_register_new_templates')); // prevent to set preserved template if it's already in use add_filter('wp_insert_post_data', array(__CLASS__, '_preserve_template'), 10, 2); add_action('save_post_page', array(__CLASS__, '_restore_preserved_template')); } add_filter('template_include', array($this, 'pre_template_include'), 9); parent::__construct(); }