Exemplo n.º 1
0
 public static function get_instance()
 {
     // create an object
     NULL === self::$instance && (self::$instance = new self());
     return self::$instance;
     // return the object
 }
Exemplo n.º 2
0
 /**
  * Initial call
  */
 public function __construct()
 {
     AnsPress_Common_Pages::get_instance();
     add_action('init', array($this, 'init_actions'));
     add_filter('post_class', array($this, 'question_answer_post_class'));
     add_filter('body_class', array($this, 'body_class'));
     add_filter('comments_template', array($this, 'comment_template'));
     add_action('after_setup_theme', array($this, 'includes'));
     add_filter('wp_title', array($this, 'ap_title'), 10, 2);
     add_filter('wpseo_title', array($this, 'wpseo_title'), 10, 2);
     add_filter('the_title', array($this, 'the_title'), 10, 2);
     add_filter('wp_head', array($this, 'feed_link'), 9);
     add_filter('wpseo_canonical', array($this, 'wpseo_canonical'));
     add_action('ap_before', array($this, 'ap_before_html_body'));
     add_action('wp', array($this, 'remove_head_items'), 10);
     add_action('wp_head', array($this, 'wp_head'), 11);
 }