Changeset 400175
- Timestamp:
- 06/23/2011 02:05:35 AM (15 years ago)
- Location:
- wp-htaccess-control/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
wp-htaccess-control.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-htaccess-control/trunk/readme.txt
r398682 r400175 7 7 Requires at least: 2.7 8 8 Tested up to: 3.1.3 9 Stable tag: 2.5. 19 Stable tag: 2.5.3 10 10 11 11 Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress. … … 73 73 == Changelog == 74 74 75 = 2.5.3 (23/06/2011) = 76 * *Fix:* fixed special characters on query using custom search base as 2.5.2 did not solve it. 77 75 78 = 2.5.2 (18/06/2011) = 76 79 * *Fix:* fixed german umlauts and other special characters on query using custom search base (thank you for pointing it out Tatron); -
wp-htaccess-control/trunk/wp-htaccess-control.php
r398591 r400175 4 4 Plugin URI: http://dardna.com/wp-htaccess-control 5 5 Description: Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress. 6 Version: 2.5. 26 Version: 2.5.3 7 7 Author: António Andrade 8 8 Author URI: http://dardna.com … … 40 40 } 41 41 function wphtc_template_redirect(){ 42 # redirect "?s=*" to "/search-base/*" 43 $WPhtc_data=get_option('WPhtc_data'); 44 if($_GET['s']&&$WPhtc_data['custom_search_permalink']!=''){ 45 wp_redirect( home_url( $WPhtc_data['custom_search_permalink']. "/" . urlencode(get_query_var( 's' )) ) ); 42 $WPhtc_data=get_option('WPhtc_data'); 43 if($WPhtc_data['custom_search_permalink']!=''){ 44 # redirect "?s=*" to "/search-base/*" 45 if($_GET['s']){ 46 wp_redirect( home_url( $WPhtc_data['custom_search_permalink']. "/" . urlencode(get_query_var( 's' )) ) ); 47 } 48 # rewrite query 49 if(strpos($_SERVER["REQUEST_URI"], $WPhtc_data['custom_search_permalink'])){ 50 global $wp_query; 51 $query=split($WPhtc_data['custom_search_permalink']."/",$_SERVER["REQUEST_URI"]); 52 $query=urldecode($query[1]); 53 $wp_query=new WP_Query('s='.$query ); 54 } 46 55 } 47 56 } … … 52 61 $query=split($WPhtc_data['custom_search_permalink']."/",$_SERVER["REQUEST_URI"]); 53 62 $query=urldecode($query[1]); 63 $query=$query; 54 64 } 55 65 return $query;
Note: See TracChangeset
for help on using the changeset viewer.