Changeset 364744
- Timestamp:
- 03/25/2011 08:34:04 PM (15 years ago)
- Location:
- wp-htaccess-control/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (3 diffs)
-
wp-htaccess-control-ui.php (modified) (1 diff)
-
wp-htaccess-control.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-htaccess-control/trunk/readme.txt
r339488 r364744 6 6 Tags: permalinks, permalink, author, htaccess, rewrite, redirect, admin, maintenance, pagination, category, category base, archive, archives 7 7 Requires at least: 2.7 8 Tested up to: 3. 0.49 Stable tag: 2. 1.28 Tested up to: 3.1 9 Stable tag: 2.2 10 10 11 11 Interface to customize the permalinks (author, category, archives and pagination) and htaccess file generated by Wordpress. … … 22 22 * Customizing the Author Permalink Base; 23 23 * Customizing Paginated Permalinks (translate the "page" word on permalinks to your own language); 24 * Customizing the Search Permalink Base; 24 25 * Category, Author and Tag based archives (ex: *"http://your-site.com/category/stories/2010/12"*, *"http://your-site.com/author/admin/2010/12/page/2"* and *"http://your-site.com/tag/wordpress/2010/12"*), this will also work if you've removed the category base; 25 26 * Maintenance mode. … … 69 70 70 71 == Changelog == 72 73 = 2.1.2 (25/03/2011) = 74 * *Feature:* adding Custom Search Base; 75 * *Fix:* fixed a long time known canonical redirection bug where links like "/?p=55" wouldn't redirect to "/post-slug" (causing duplicated content). 71 76 72 77 = 2.1.2 (01/02/2011) = -
wp-htaccess-control/trunk/wp-htaccess-control-ui.php
r316135 r364744 71 71 <p class="description"><?php _e('If set, the page base will be used as shown next to the form field in every post listing (category, tag, archive, etc).', 'wp-htaccess-control'); ?></p> 72 72 <p class="description"><?php _e('If you do not want to use a custom Pagination Permalink base just leave the field empty.', 'wp-htaccess-control'); ?></p> 73 </td> 74 </tr> 75 </table> 76 </div> 77 <!-- Custom Search Permalink --> 78 <div class="wphtc-section"> 79 <div class="wphtc-section-title stuffbox"> 80 <div title="Click to toggle" class="handlediv" style="background:url('<?php bloginfo("wpurl")?>/wp-admin/images/menu-bits.gif') no-repeat scroll left -111px transparent"><br></div> 81 <h3><?php _e('Custom Search Permalink', 'wp-htaccess-control');?></h3> 82 </div> 83 <table class="form-table wphtc-inputs"> 84 <tr valign="top"> 85 <th scope="row" style="width:18%;"><?php _e('Search Base', 'wp-htaccess-control'); ?></th> 86 <td > 87 <input type="text" name="WPhtc_custom_search_permalink" value="<?php echo $WPhtc_data['custom_search_permalink']; ?>" /> 88 <p><code><?php bloginfo('home')?>/<em><?php _e('(your-base)', 'wp-htaccess-control');?></em>/search-term</code></p> 89 </td> 90 <td valign="middle"> 91 <p class="description"><?php _e('Permalink settings must be set and not Default (/?p=123).', 'wp-htaccess-control'); ?></p> 92 <p class="description"><?php _e('If you do not want to use a custom Search Permalink base just leave the field empty.', 'wp-htaccess-control'); ?></p> 73 93 </td> 74 94 </tr> -
wp-htaccess-control/trunk/wp-htaccess-control.php
r339488 r364744 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. 1.26 Version: 2.2 7 7 Author: António Andrade 8 8 Author URI: http://dardna.com … … 68 68 } 69 69 # Disable canonical redirection on urls using custom pagination permalink 70 function wphtc_filter_redirect_canonical($redirect_url,$requested_url){ 71 $WPhtc_data=get_option('WPhtc_data'); 72 return false; 73 if(isset($WPhtc_data['cpp'])&&$WPhtc_data['cpp']!=''&&get_query_var('paged') > 1&&strpos($requested_url,urlencode($WPhtc_data['cpp']))){ 70 function wphtc_filter_redirect_canonical($requested_url){ 71 $WPhtc_data=get_option('WPhtc_data'); 72 if(isset($WPhtc_data['cpp'])&&preg_match($WPhtc_data['cpp'],$requested_url)){ 74 73 return false; 75 74 } 76 75 else{ 77 return $re direct_url;78 } 79 } 80 # Rewrite Rul us: Add Category + Tag + Author Archives; Custom Pagination; Custom Author Base76 return $requested_url; 77 } 78 } 79 # Rewrite Rules: Add Category + Tag + Author Archives; Custom Pagination; Custom Author Base 81 80 function wphtc_filter_rewrite_rules($rewrite_rules){ 82 81 $WPhtc_data=get_option('WPhtc_data'); … … 139 138 if(isset($WPhtc_data['cpp'])&&$WPhtc_data['cpp']!=''){ 140 139 $rewrite_rules=str_replace('page/',$WPhtc_data['cpp'].'/',$rewrite_rules); 140 } 141 # Search 142 if(isset($WPhtc_data['custom_search_permalink'])&&$WPhtc_data['custom_search_permalink']!=''){ 143 $rewrite_rules=str_replace('search/',$WPhtc_data['custom_search_permalink'].'/',$rewrite_rules); 141 144 } 142 145 $rewrite_rules=unserialize(preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'",$rewrite_rules)); … … 441 444 # get Custom Pagination Permalink 442 445 $WPhtc_data['cpp']=$_POST['WPhtc_cpp']; 446 # get Custom Search Permalink 447 $WPhtc_data['custom_search_permalink']=$_POST['WPhtc_custom_search_permalink']; 443 448 # wordpress htaccess and jim morgan's htaccess 444 449 $WPhtc_data['wp_hta']=$_POST['WPhtc_wp_hta']."\n";
Note: See TracChangeset
for help on using the changeset viewer.