Custom Permalinks - Version 0.7.27

Version Description

  • Fixed Loop Redirecting issue
Download this release

Release Info

Developer sasiddiqui
Plugin Icon Custom Permalinks
Version 0.7.27
Comparing to
See all releases

Code changes from version 0.7.26 to 0.7.27

Files changed (2) hide show
  1. custom-permalinks.php +9 -5
  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.26
8
  Author: Michael Tyson
9
  Author URI: http://atastypixel.com/blog
10
  Text Domain: custom-permalinks
@@ -275,9 +275,13 @@ function custom_permalinks_trailingslash($string, $type) {
275
 
276
  if ( !trim($request) ) return $string;
277
 
278
- if ( trim($_CPRegisteredURL,'/') == trim($request,'/') && isset($url['path']) ) {
279
- return ($string{0} == '/' ? '/' : '') . trailingslashit($url['path']) . $_CPRegisteredURL;
280
- }
 
 
 
 
281
  return $string;
282
  }
283
 
@@ -293,7 +297,7 @@ function custom_permalinks_trailingslash($string, $type) {
293
  * @since 0.6
294
  */
295
  function custom_permalink_get_sample_permalink_html($html, $id, $new_title, $new_slug) {
296
- $permalink = get_post_meta( $id, 'custom_permalink', true );
297
  $post = &get_post($id);
298
 
299
  ob_start();
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.27
8
  Author: Michael Tyson
9
  Author URI: http://atastypixel.com/blog
10
  Text Domain: custom-permalinks
275
 
276
  if ( !trim($request) ) return $string;
277
 
278
+ if ( trim($_CPRegisteredURL,'/') == trim($request,'/') ) {
279
+ if( isset($url['path']) ){
280
+ return ($string{0} == '/' ? '/' : '') . trailingslashit($url['path']) . $_CPRegisteredURL;
281
+ }else{
282
+ return ($string{0} == '/' ? '/' : '') . $_CPRegisteredURL;
283
+ }
284
+ }
285
  return $string;
286
  }
287
 
297
  * @since 0.6
298
  */
299
  function custom_permalink_get_sample_permalink_html($html, $id, $new_title, $new_slug) {
300
+ $permalink = get_post_meta( $id, 'custom_permalink', true );
301
  $post = &get_post($id);
302
 
303
  ob_start();
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: http://atastypixel.com/blog/wordpress/plugins/custom-permalinks/
5
  Tags: permalink, url, link, address, custom, redirect
6
  Requires at least: 2.6
7
  Tested up to: 4.5
8
- Stable tag: 0.7.26
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -32,6 +32,10 @@ within that category.
32
 
33
  == Changelog ==
34
 
 
 
 
 
35
  = 0.7.26 =
36
 
37
  * Fixed PHP Notice issue
5
  Tags: permalink, url, link, address, custom, redirect
6
  Requires at least: 2.6
7
  Tested up to: 4.5
8
+ Stable tag: 0.7.27
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
32
 
33
  == Changelog ==
34
 
35
+ = 0.7.27 =
36
+
37
+ * Fixed Loop Redirecting issue
38
+
39
  = 0.7.26 =
40
 
41
  * Fixed PHP Notice issue