Custom Permalinks - Version 0.7.24

Version Description

  • Fixed a problem with page URLs
Download this release

Release Info

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

Code changes from version 0.7.23 to 0.7.24

Files changed (2) hide show
  1. custom-permalinks.php +11 -1
  2. readme.txt +5 -1
custom-permalinks.php CHANGED
@@ -693,7 +693,17 @@ function custom_permalinks_original_post_link($post_id) {
693
  * @since 0.4
694
  */
695
  function custom_permalinks_original_page_link($post_id) {
696
- return custom_permalinks_original_post_link($post_id);
 
 
 
 
 
 
 
 
 
 
697
  }
698
 
699
 
693
  * @since 0.4
694
  */
695
  function custom_permalinks_original_page_link($post_id) {
696
+ remove_filter( 'page_link', 'custom_permalinks_page_link', 'edit_files', 2 );
697
+ remove_filter( 'user_trailingslashit', 'custom_permalinks_trailingslash', 'edit_files', 2 );
698
+
699
+ require_once ABSPATH . '/wp-admin/includes/post.php';
700
+ list( $permalink, $post_name ) = get_sample_permalink( $post_id );
701
+ $permalink = str_replace(array('%pagename%','%postname%'), $post_name, $permalink);
702
+ $permalink = ltrim(str_replace(home_url(), '', $permalink), '/');
703
+
704
+ add_filter( 'user_trailingslashit', 'custom_permalinks_trailingslash', 'edit_files', 2 );
705
+ add_filter( 'page_link', 'custom_permalinks_page_link', 'edit_files', 2 );
706
+ return $permalink;
707
  }
708
 
709
 
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: 4.5
7
- Stable tag: 0.7.23
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.23 =
33
 
34
  * Fixed a problem with permalinks with "/" components
4
  Tags: permalink, url, link, address, custom, redirect
5
  Requires at least: 2.6
6
  Tested up to: 4.5
7
+ Stable tag: 0.7.24
8
 
9
  Set custom permalinks on a per-post, per-tag or per-category basis.
10
 
29
 
30
  == Changelog ==
31
 
32
+ = 0.7.24 =
33
+
34
+ * Fixed a problem with page URLs
35
+
36
  = 0.7.23 =
37
 
38
  * Fixed a problem with permalinks with "/" components