Exemple #1
0
 function __construct()
 {
     add_action('wp_ajax_o2_tag_search', array($this, 'tag_search'));
     add_action('transition_post_status', array($this, 'process_tags'), 12, 3);
     add_filter('the_content', array('o2_Tags', 'append_old_tags'), 14);
     add_filter('the_content', array('o2_Tags', 'tag_links'), 15);
     add_filter('comment_text', array('o2_Tags', 'tag_links'), 15);
     add_filter('o2_post_fragment', array($this, 'append_old_tags_to_fragment'), 10, 1);
     parent::o2_Terms_In_Comments('post_tag');
 }
Exemple #2
0
 /**
  * X-posts permalinks pages are useless, let's redirect them to the original post
  *
  * @uses get_post_meta, wp_redirect
  * @return void
  */
 function redirect_permalink($query)
 {
     if (!parent::should_process_terms()) {
         return;
     }
     $post_id = get_the_ID();
     if (is_single() && ($link = get_post_meta($post_id, '_xpost_original_permalink', true))) {
         wp_redirect($link);
         exit;
     }
 }