Plugin Directory

Changeset 398591


Ignore:
Timestamp:
06/18/2011 01:07:22 AM (15 years ago)
Author:
dardna
Message:

Corrected some issues with custom search base; preparing 2.5.2.

Location:
wp-htaccess-control/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-htaccess-control/trunk/readme.txt

    r390832 r398591  
    77Requires at least: 2.7
    88Tested up to: 3.1.3
    9 Stable tag: 2.5.1
     9Stable tag: 2.5.2
    1010
    1111Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress.
     
    7373== Changelog ==
    7474
     75= 2.5.2 (18/06/2011) =
     76* *Fix:* fixed german umlauts and other special characters on query using custom search base (thank you for pointing it out Tatron);
     77* *Fix:* get_search_query no longer empty when using custom search base.
     78
    7579= 2.5.1 (30/05/2011) =
    7680* *Fix:* fixed php short tag on wp-htaccess-control-ui.php (thank you caillou!).
  • wp-htaccess-control/trunk/wp-htaccess-control.php

    r390830 r398591  
    44Plugin URI: http://dardna.com/wp-htaccess-control
    55Description: Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress.
    6 Version: 2.5.1
     6Version: 2.5.2
    77Author: António Andrade
    88Author URI: http://dardna.com
     
    4343            $WPhtc_data=get_option('WPhtc_data');
    4444            if($_GET['s']&&$WPhtc_data['custom_search_permalink']!=''){
    45                 wp_redirect( home_url( $WPhtc_data['custom_search_permalink']. "/" . str_replace( array( ' ', '%20' ),  array( '+', '+' ), get_query_var( 's' ) ) ) );
    46                 }
     45                wp_redirect( home_url( $WPhtc_data['custom_search_permalink']. "/" .  urlencode(get_query_var( 's' )) ) );
     46                }
     47            }
     48        # return get_search_query on custom search base
     49        function wphtc_get_search_query_filter($query){
     50            $WPhtc_data=get_option('WPhtc_data');
     51            if($WPhtc_data['custom_search_permalink']!=''&&strpos($_SERVER["REQUEST_URI"], $WPhtc_data['custom_search_permalink'])){
     52                $query=split($WPhtc_data['custom_search_permalink']."/",$_SERVER["REQUEST_URI"]);
     53                $query=urldecode($query[1]);
     54                }
     55            return $query;
    4756            }
    4857        function wphtc_check_first_run(){
     
    545554    add_filter('get_pagenum_link',array($WPhtc,'wphtc_filter_get_pagenum_link'));
    546555    add_filter('redirect_canonical',array($WPhtc,'wphtc_filter_redirect_canonical'),10,10);
     556    add_filter('get_search_query',array($WPhtc,'wphtc_get_search_query_filter'),10,10);
    547557    add_action('admin_menu', array($WPhtc,'configure_menu'));
    548558    add_action('sm_buildmap',array($WPhtc,'set_sm'));
Note: See TracChangeset for help on using the changeset viewer.