WordPress.org

Plugin Directory


Ignore:
Timestamp:
02/25/11 01:39:04 (7 years ago)
Author:
neoxx
Message:

1.31

  • small enhancements
  • fixed WordPress deprecated warning
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tagpages/trunk/tagpages.php

    r288870 r350748  
    66Description: Adds post-tags functionality for pages. 
    77Author: Dr. Bernhard Riedl 
    8 Version: 1.30 
     8Version: 1.31 
    99Author URI: http://www.bernhard.riedl.name/ 
    1010*/ 
    1111 
    1212/* 
    13 Copyright 2010 Dr. Bernhard Riedl 
     13Copyright 2010-2011 Dr. Bernhard Riedl 
    1414 
    1515This program is free software: 
     
    175175    to where statement of 
    176176    front-end tag-queries 
    177  
    178     taken from tags4page by Michele Marcucci 
    179     http://www.michelem.org/wordpress-plugin-tags4page/ 
    180177    */ 
    181178 
    182179    function add_page_to_tags_where_clause($where) { 
    183         if (is_tag() && (!defined('WP_ADMIN') || (defined('WP_ADMIN') && !WP_ADMIN))) 
    184             $where = preg_replace("/ ([0-9a-zA-Z_]*\.?)post_type = 'post'/", "(${1}post_type = 'post' OR ${1}post_type = 'page')", $where); 
     180        if (is_tag() && !is_admin()) { 
     181            global $wpdb; 
     182 
     183            $where = str_replace("$wpdb->posts.post_type = 'post'", "$wpdb->posts.post_type IN ('post', 'page')", $where); 
     184        } 
    185185 
    186186        return $where; 
     
    266266 
    267267        $plugin_dir = basename(dirname(__FILE__)); 
    268         load_plugin_textdomain($this->get_prefix(false), null, $plugin_dir.'/lang'); 
     268        load_plugin_textdomain($this->get_prefix(false), false, $plugin_dir.'/lang'); 
    269269    } 
    270270 
     
    274274 
    275275    function head_meta() { 
    276         echo("<meta name=\"".$this->get_nicename()."\" content=\"1.30\"/>\n"); 
     276        echo("<meta name=\"".$this->get_nicename()."\" content=\"1.31\"/>\n"); 
    277277    } 
    278278 
Note: See TracChangeset for help on using the changeset viewer.