Custom Permalinks - Version 0.7.13

Version Description

  • Fixed issue with term permalinks not working properly on some installations
Download this release

Release Info

Developer michaeltyson
Plugin Icon Custom Permalinks
Version 0.7.13
Comparing to
See all releases

Code changes from version 0.7.12 to 0.7.13

Files changed (2) hide show
  1. custom-permalinks.php +7 -1
  2. readme.txt +5 -1
custom-permalinks.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Custom Permalinks
4
  Plugin URI: http://atastypixel.com/blog/wordpress/plugins/custom-permalinks/
5
  Donate link: http://atastypixel.com/blog/wordpress/plugins/custom-permalinks/
6
  Description: Set custom permalinks on a per-post basis
7
- Version: 0.7.12
8
  Author: Michael Tyson
9
  Author URI: http://atastypixel.com/blog
10
  */
@@ -664,7 +664,9 @@ function custom_permalinks_original_post_link($post_id) {
664
  */
665
  function custom_permalinks_original_page_link($post_id) {
666
  remove_filter( 'page_link', 'custom_permalinks_page_link', 10, 2 );
 
667
  $originalPermalink = ltrim(str_replace(get_home_url(), '', get_permalink( $post_id )), '/');
 
668
  add_filter( 'page_link', 'custom_permalinks_page_link', 10, 2 );
669
  return $originalPermalink;
670
  }
@@ -678,7 +680,9 @@ function custom_permalinks_original_page_link($post_id) {
678
  */
679
  function custom_permalinks_original_tag_link($tag_id) {
680
  remove_filter( 'tag_link', 'custom_permalinks_term_link', 10, 2 );
 
681
  $originalPermalink = ltrim(str_replace(get_home_url(), '', get_tag_link($tag_id)), '/');
 
682
  add_filter( 'tag_link', 'custom_permalinks_term_link', 10, 2 );
683
  return $originalPermalink;
684
  }
@@ -691,7 +695,9 @@ function custom_permalinks_original_tag_link($tag_id) {
691
  */
692
  function custom_permalinks_original_category_link($category_id) {
693
  remove_filter( 'category_link', 'custom_permalinks_term_link', 10, 2 );
 
694
  $originalPermalink = ltrim(str_replace(get_home_url(), '', get_category_link($category_id)), '/');
 
695
  add_filter( 'category_link', 'custom_permalinks_term_link', 10, 2 );
696
  return $originalPermalink;
697
  }
4
  Plugin URI: http://atastypixel.com/blog/wordpress/plugins/custom-permalinks/
5
  Donate link: http://atastypixel.com/blog/wordpress/plugins/custom-permalinks/
6
  Description: Set custom permalinks on a per-post basis
7
+ Version: 0.7.13
8
  Author: Michael Tyson
9
  Author URI: http://atastypixel.com/blog
10
  */
664
  */
665
  function custom_permalinks_original_page_link($post_id) {
666
  remove_filter( 'page_link', 'custom_permalinks_page_link', 10, 2 );
667
+ remove_filter( 'user_trailingslashit', 'custom_permalinks_trailingslash', 10, 2 );
668
  $originalPermalink = ltrim(str_replace(get_home_url(), '', get_permalink( $post_id )), '/');
669
+ add_filter( 'user_trailingslashit', 'custom_permalinks_trailingslash', 10, 2 );
670
  add_filter( 'page_link', 'custom_permalinks_page_link', 10, 2 );
671
  return $originalPermalink;
672
  }
680
  */
681
  function custom_permalinks_original_tag_link($tag_id) {
682
  remove_filter( 'tag_link', 'custom_permalinks_term_link', 10, 2 );
683
+ remove_filter( 'user_trailingslashit', 'custom_permalinks_trailingslash', 10, 2 );
684
  $originalPermalink = ltrim(str_replace(get_home_url(), '', get_tag_link($tag_id)), '/');
685
+ add_filter( 'user_trailingslashit', 'custom_permalinks_trailingslash', 10, 2 );
686
  add_filter( 'tag_link', 'custom_permalinks_term_link', 10, 2 );
687
  return $originalPermalink;
688
  }
695
  */
696
  function custom_permalinks_original_category_link($category_id) {
697
  remove_filter( 'category_link', 'custom_permalinks_term_link', 10, 2 );
698
+ remove_filter( 'user_trailingslashit', 'custom_permalinks_trailingslash', 10, 2 );
699
  $originalPermalink = ltrim(str_replace(get_home_url(), '', get_category_link($category_id)), '/');
700
+ add_filter( 'user_trailingslashit', 'custom_permalinks_trailingslash', 10, 2 );
701
  add_filter( 'category_link', 'custom_permalinks_term_link', 10, 2 );
702
  return $originalPermalink;
703
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://atastypixel.com/blog/wordpress/plugins/custom-permalinks/
4
  Tags: permalink, url, link, address, custom, redirect
5
  Requires at least: 2.6
6
  Tested up to: 3.3.1
7
- Stable tag: 0.7.12
8
 
9
  Set custom permalinks on a per-post, per-tag or per-category basis.
10
 
@@ -29,6 +29,10 @@ within that category.
29
 
30
  == Changelog ==
31
 
 
 
 
 
32
  = 0.7.12 =
33
 
34
  * Fixed issue with feed URLs in non-webroot blog installations
4
  Tags: permalink, url, link, address, custom, redirect
5
  Requires at least: 2.6
6
  Tested up to: 3.3.1
7
+ Stable tag: 0.7.13
8
 
9
  Set custom permalinks on a per-post, per-tag or per-category basis.
10
 
29
 
30
  == Changelog ==
31
 
32
+ = 0.7.13 =
33
+
34
+ * Fixed issue with term permalinks not working properly on some installations
35
+
36
  = 0.7.12 =
37
 
38
  * Fixed issue with feed URLs in non-webroot blog installations