XPressME Integration Kit

Trac


Ignore:
Timestamp:
Aug 11, 2009, 4:31:35 PM (15 years ago)
Author:
toemon
Message:

WP2.1.3MEへの対応 fixed #199
但しWP2.1.3ME自体のバグ(MySQL4.1以上でEUC-JPを使用したときの文字化け)があるので注意

Location:
trunk/xpressme_integration_kit/wp-content/plugins/xpressme
Files:
1 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/custom_functions.php

    r350 r360  
    1616} 
    1717 
    18 function xpress_is_wp20() { 
     18function xpress_is_wp_version($operator='==',$comp_version){ 
    1919        global $xoops_config; 
    20          
    21         return $xoops_config->is_wp20; 
     20        return version_compare($xoops_config->wp_version, $comp_version, $operator); 
    2221} 
    2322 
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/xpress_common_functions.php

    r286 r360  
    250250                        } 
    251251                } else { 
    252                         if(xpress_is_wp20()){ 
     252                        if(xpress_is_wp_version('<','2.1')){  // Maybe, I think that it is ver2.1 or less. 
    253253                                if (!empty($wp->matched_query) ){ 
    254254                                        if (strpos($wp->matched_query,'author_name') !== false ){ 
     
    303303        $query = preg_replace('/\s\s+/', ' ', $query); 
    304304        if (!empty($_COOKIE[$author_cookie])){ 
    305                 if(xpress_is_wp20()){ 
     305                if(xpress_is_wp_version('<','2.1')){ 
    306306                        $pattern = "WHERE.*AND\s?\(*post_author\s*="; 
    307307                        if ( preg_match ( "/".$pattern."/i", $query, $match ) ){ 
  • trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php

    r349 r360  
    2020 
    2121require_once dirname( __FILE__ ).'/include/pluggable-override.php' ; 
    22 if ($xoops_config->is_wp20) 
    23         require_once dirname( __FILE__ ).'/include/functions_for_wp20.php' ; 
     22require_once dirname( __FILE__ ).'/include/functions_for_wp_old.php' ; 
    2423 
    2524function my_plugin_menu() 
     
    9897add_filter('query','xpress_query_filter'); 
    9998//add_action("init", "xpress_set_author_cookie"); 
    100 if(xpress_is_wp20()){ 
     99if(xpress_is_wp_version('<','2.1')){ 
    101100        // It is called before parse_request() makes $GET.  
    102101        add_action("query_vars", "xpress_set_author_cookie"); 
Note: See TracChangeset for help on using the changeset viewer.