Custom Permalinks - Version 1.3.0

Version Description

  • June 07, 2018 =

    • Enhancement
    • [Conflict with WPML]https://wordpress.org/support/topic/conflict-with-wpml-17/)
    • Avoid appending slashes and use trailingslashit instead
Download this release

Release Info

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

Code changes from version 1.2.24 to 1.3.0

changelog.txt CHANGED
@@ -2,6 +2,29 @@
2
 
3
  This file contains only old changelog. See readme.txt for newer versions.
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  = 1.2.19 - April 10, 2018 =
6
 
7
  * Bugs
2
 
3
  This file contains only old changelog. See readme.txt for newer versions.
4
 
5
+ = 1.2.22 - May 16, 2018 =
6
+
7
+ * Enhancement
8
+ * Added Capabilities to view the Permalinks Page
9
+
10
+ * Bug
11
+ * Fixed cp_remove_like_query Filter issue
12
+
13
+ = 1.2.21 - April 17, 2018 =
14
+
15
+ * Bug
16
+ * Removed final keyword with the classes.
17
+ For further details:
18
+ https://wordpress.org/support/topic/page-not-found-404-errors-after-latest-update/
19
+ https://wordpress.org/support/topic/throws-404-here-and-there/
20
+
21
+ = 1.2.20 - April 11, 2018 =
22
+
23
+ * Bug
24
+ * Removed extra code which was written for the equal query.
25
+ For further details:
26
+ https://wordpress.org/support/topic/page-not-found-404-errors-after-latest-update/
27
+
28
  = 1.2.19 - April 10, 2018 =
29
 
30
  * Bugs
custom-permalinks.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Custom Permalinks
4
  * Plugin URI: https://wordpress.org/plugins/custom-permalinks/
5
  * Description: Set custom permalinks on a per-post basis
6
- * Version: 1.2.24
7
  * Author: Sami Ahmed Siddiqui
8
  * Author URI: https://www.custompermalinks.com/
9
  * Donate link: https://www.paypal.me/yasglobal
@@ -64,7 +64,7 @@ class Custom_Permalinks {
64
  }
65
 
66
  if ( ! defined( 'CUSTOM_PERMALINKS_PLUGIN_VERSION' ) ) {
67
- define( 'CUSTOM_PERMALINKS_PLUGIN_VERSION', '1.2.24' );
68
  }
69
 
70
  if ( ! defined( 'CUSTOM_PERMALINKS_PATH' ) ) {
3
  * Plugin Name: Custom Permalinks
4
  * Plugin URI: https://wordpress.org/plugins/custom-permalinks/
5
  * Description: Set custom permalinks on a per-post basis
6
+ * Version: 1.3.0
7
  * Author: Sami Ahmed Siddiqui
8
  * Author URI: https://www.custompermalinks.com/
9
  * Donate link: https://www.paypal.me/yasglobal
64
  }
65
 
66
  if ( ! defined( 'CUSTOM_PERMALINKS_PLUGIN_VERSION' ) ) {
67
+ define( 'CUSTOM_PERMALINKS_PLUGIN_VERSION', '1.3.0' );
68
  }
69
 
70
  if ( ! defined( 'CUSTOM_PERMALINKS_PATH' ) ) {
frontend/class-custom-permalinks-frontend.php CHANGED
@@ -347,9 +347,9 @@ class Custom_Permalinks_Frontend {
347
  $post_type = isset( $post->post_type ) ? $post->post_type : 'post';
348
  $language_code = apply_filters( 'wpml_element_language_code', null, array( 'element_id' => $post->ID, 'element_type' => $post_type ) );
349
  if ( $language_code )
350
- return apply_filters( 'wpml_permalink', home_url() . '/' . $custom_permalink, $language_code );
351
  else
352
- return apply_filters( 'wpml_permalink', home_url() . '/' . $custom_permalink );
353
  }
354
 
355
  return $permalink;
@@ -366,9 +366,9 @@ class Custom_Permalinks_Frontend {
366
  if ( $custom_permalink ) {
367
  $language_code = apply_filters( 'wpml_element_language_code', null, array( 'element_id' => $page, 'element_type' => 'page' ) );
368
  if ( $language_code )
369
- return apply_filters( 'wpml_permalink', home_url() . '/' . $custom_permalink, $language_code );
370
  else
371
- return apply_filters( 'wpml_permalink', home_url() . '/' . $custom_permalink );
372
  }
373
 
374
  return $permalink;
@@ -395,9 +395,9 @@ class Custom_Permalinks_Frontend {
395
  $term_type = $taxonomy->taxonomy;
396
  }
397
  $language_code = apply_filters( 'wpml_element_language_code', null, array( 'element_id' => $taxonomy->term_taxonomy_id, 'element_type' => $term_type ) );
398
- return apply_filters( 'wpml_permalink', home_url() . '/' . $custom_permalink, $language_code );
399
  } else {
400
- return apply_filters( 'wpml_permalink', home_url() . '/' . $custom_permalink );
401
  }
402
  }
403
 
347
  $post_type = isset( $post->post_type ) ? $post->post_type : 'post';
348
  $language_code = apply_filters( 'wpml_element_language_code', null, array( 'element_id' => $post->ID, 'element_type' => $post_type ) );
349
  if ( $language_code )
350
+ return apply_filters( 'wpml_permalink', trailingslashit( home_url() ) . $custom_permalink, $language_code );
351
  else
352
+ return apply_filters( 'wpml_permalink', trailingslashit( home_url() ) . $custom_permalink );
353
  }
354
 
355
  return $permalink;
366
  if ( $custom_permalink ) {
367
  $language_code = apply_filters( 'wpml_element_language_code', null, array( 'element_id' => $page, 'element_type' => 'page' ) );
368
  if ( $language_code )
369
+ return apply_filters( 'wpml_permalink', trailingslashit( home_url() ) . $custom_permalink, $language_code );
370
  else
371
+ return apply_filters( 'wpml_permalink', trailingslashit( home_url() ) . $custom_permalink );
372
  }
373
 
374
  return $permalink;
395
  $term_type = $taxonomy->taxonomy;
396
  }
397
  $language_code = apply_filters( 'wpml_element_language_code', null, array( 'element_id' => $taxonomy->term_taxonomy_id, 'element_type' => $term_type ) );
398
+ return apply_filters( 'wpml_permalink', trailingslashit( home_url() ) . $custom_permalink, $language_code );
399
  } else {
400
+ return apply_filters( 'wpml_permalink', trailingslashit( home_url() ) . $custom_permalink );
401
  }
402
  }
403
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/yasglobal
4
  Tags: permalink, url, link, address, custom, redirect, custom post type, GDPR, GDPR Compliant
5
  Requires at least: 2.6
6
  Tested up to: 4.9
7
- Stable tag: 1.2.24
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl.html
10
 
@@ -97,6 +97,12 @@ This process defines you the steps to follow either you are installing through W
97
 
98
  == Changelog ==
99
 
 
 
 
 
 
 
100
  = 1.2.24 - May 31, 2018 =
101
 
102
  * Bug
@@ -107,29 +113,6 @@ This process defines you the steps to follow either you are installing through W
107
  * Enhancement
108
  * Added Privacy Policy Content for WordPress 4.9.6 and higher.
109
 
110
- = 1.2.22 - May 16, 2018 =
111
-
112
- * Enhancement
113
- * Added Capabilities to view the Permalinks Page
114
-
115
- * Bug
116
- * Fixed cp_remove_like_query Filter issue
117
-
118
- = 1.2.21 - April 17, 2018 =
119
-
120
- * Bug
121
- * Removed final keyword with the classes.
122
- For further details:
123
- https://wordpress.org/support/topic/page-not-found-404-errors-after-latest-update/
124
- https://wordpress.org/support/topic/throws-404-here-and-there/
125
-
126
- = 1.2.20 - April 11, 2018 =
127
-
128
- * Bug
129
- * Removed extra code which was written for the equal query.
130
- For further details:
131
- https://wordpress.org/support/topic/page-not-found-404-errors-after-latest-update/
132
-
133
  = Earlier versions =
134
 
135
  * For the changelog of earlier versions, please refer to the separate changelog.txt file.
4
  Tags: permalink, url, link, address, custom, redirect, custom post type, GDPR, GDPR Compliant
5
  Requires at least: 2.6
6
  Tested up to: 4.9
7
+ Stable tag: 1.3.0
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl.html
10
 
97
 
98
  == Changelog ==
99
 
100
+ = 1.3.0 - June 07, 2018 =
101
+
102
+ * Enhancement
103
+ * [Conflict with WPML]https://wordpress.org/support/topic/conflict-with-wpml-17/)
104
+ * Avoid appending slashes and use trailingslashit instead
105
+
106
  = 1.2.24 - May 31, 2018 =
107
 
108
  * Bug
113
  * Enhancement
114
  * Added Privacy Policy Content for WordPress 4.9.6 and higher.
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  = Earlier versions =
117
 
118
  * For the changelog of earlier versions, please refer to the separate changelog.txt file.