function __construct()
 {
     parent::__construct();
     add_action('admin_init', array($this, 'save_boiler_plate'));
     $settings = get_option('pne_settings_press_releases', array('use_boilerplate'));
     if (in_array('use_boilerplate', $settings)) {
         add_action('admin_menu', array($this, 'boilder_plate_menu'));
         add_filter('the_content', array($this, 'inject_boilerplate'));
         add_action('wp_before_admin_bar_render', array($this, 'admin_bar'));
     }
 }
Exemple #2
0
 function __construct()
 {
     parent::__construct();
     if (PNE_Settings::auto_archive($this->slug)) {
         $this->new_rules();
         add_filter('rewrite_rules_array', array($this, 'insert_rewrite_rules'));
         add_filter('query_vars', array($this, 'insert_query_vars'));
         add_action('wp_loaded', array($this, 'flush_rules'));
     }
     add_filter('posts_join', array($this, 'posts_join'));
     add_filter('posts_where', array($this, 'posts_where'));
     add_filter('posts_orderby', array($this, 'posts_orderby'));
     add_filter('post_limits', array($this, 'post_limits'));
 }
Exemple #3
0
 function __construct()
 {
     parent::__construct();
     add_filter('posts_join', array($this, 'posts_join'));
     add_filter('posts_orderby', array($this, 'posts_orderby'));
 }