Version Description
-
April 11, 2018 =
- Bug
- Removed extra code which was written for the equal query. For further details: https://wordpress.org/support/topic/page-not-found-404-errors-after-latest-update/
Download this release
Release Info
Developer | sasiddiqui |
Plugin | Custom Permalinks |
Version | 1.2.20 |
Comparing to | |
See all releases |
Code changes from version 1.2.19 to 1.2.20
- custom-permalinks.php +2 -2
- frontend/class-custom-permalinks-frontend.php +1 -55
- readme.txt +8 -1
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.
|
7 |
* Author: Sami Ahmed Siddiqui
|
8 |
* Author URI: https://www.custompermalinks.com/
|
9 |
* Donate link: https://www.paypal.me/yasglobal
|
@@ -64,7 +64,7 @@ final class Custom_Permalinks {
|
|
64 |
}
|
65 |
|
66 |
if ( ! defined( 'CUSTOM_PERMALINKS_PLUGIN_VERSION' ) ) {
|
67 |
-
define( 'CUSTOM_PERMALINKS_PLUGIN_VERSION', '1.2.
|
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.2.20
|
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.2.20' );
|
68 |
}
|
69 |
|
70 |
if ( ! defined( 'CUSTOM_PERMALINKS_PATH' ) ) {
|
frontend/class-custom-permalinks-frontend.php
CHANGED
@@ -80,32 +80,7 @@ final class Custom_Permalinks_Frontend {
|
|
80 |
$cp_form = new Custom_Permalinks_Form();
|
81 |
$request = $cp_form->custom_permalinks_check_conflicts( $request );
|
82 |
}
|
83 |
-
|
84 |
-
|
85 |
-
$remove_pager = '';
|
86 |
-
if ( false !== strpos( $request_noslash, '/page/' ) ) {
|
87 |
-
$check_pager = explode( '/', $request_noslash );
|
88 |
-
$get_pager_no = count( $check_pager ) - 1;
|
89 |
-
if ( is_numeric( $check_pager[$get_pager_no] ) ) {
|
90 |
-
$remove_pager = '/page/' . $check_pager[$get_pager_no];
|
91 |
-
$request_noslash = str_replace( $remove_pager, '', $request_noslash );
|
92 |
-
}
|
93 |
-
}
|
94 |
-
|
95 |
-
if ( false !== strpos( $request_noslash, '/comment-page-' ) ) {
|
96 |
-
$check_pager = explode( '/comment-page-', $request_noslash );
|
97 |
-
$get_pager_no = count( $check_pager ) - 1;
|
98 |
-
if ( is_numeric( $check_pager[$get_pager_no] ) ) {
|
99 |
-
$remove_pager = '/comment-page-' . $check_pager[$get_pager_no];
|
100 |
-
$request_noslash = str_replace( $remove_pager, '', $request_noslash );
|
101 |
-
}
|
102 |
-
}
|
103 |
-
|
104 |
-
$post_feed = 0;
|
105 |
-
if ( false !== strpos( $request_noslash, '/feed' ) ) {
|
106 |
-
$request_noslash = str_replace( '/feed', '', $request_noslash );
|
107 |
-
$post_feed = 1;
|
108 |
-
}
|
109 |
|
110 |
$sql = $wpdb->prepare( "SELECT p.ID, pm.meta_value, p.post_type, p.post_status " .
|
111 |
" FROM $wpdb->posts AS p INNER JOIN $wpdb->postmeta AS pm ON (pm.post_id = p.ID) " .
|
@@ -159,12 +134,6 @@ final class Custom_Permalinks_Frontend {
|
|
159 |
str_replace( $post_meta, $get_original_url, strtolower( $request_noslash ) )
|
160 |
);
|
161 |
}
|
162 |
-
if ( 1 == $post_feed ) {
|
163 |
-
$original_url = $original_url . '/feed';
|
164 |
-
}
|
165 |
-
if ( '' !== $remove_pager ) {
|
166 |
-
$original_url = $original_url . $remove_pager;
|
167 |
-
}
|
168 |
}
|
169 |
}
|
170 |
|
@@ -284,29 +253,6 @@ final class Custom_Permalinks_Frontend {
|
|
284 |
}
|
285 |
$request_noslash = preg_replace( '@/+@','/', trim( $request, '/' ) );
|
286 |
|
287 |
-
$remove_pager = '';
|
288 |
-
if ( false !== strpos( $request_noslash, '/page/' ) ) {
|
289 |
-
$check_pager = explode( '/', $request_noslash );
|
290 |
-
$get_pager_no = count( $check_pager ) - 1;
|
291 |
-
if ( is_numeric( $check_pager[$get_pager_no] ) ) {
|
292 |
-
$remove_pager = '/page/' . $check_pager[$get_pager_no];
|
293 |
-
$request_noslash = str_replace( $remove_pager, '', $request_noslash );
|
294 |
-
}
|
295 |
-
}
|
296 |
-
|
297 |
-
if ( false !== strpos( $request_noslash, '/comment-page-' ) ) {
|
298 |
-
$check_pager = explode( '/comment-page-', $request_noslash );
|
299 |
-
$get_pager_no = count( $check_pager ) - 1;
|
300 |
-
if ( is_numeric( $check_pager[$get_pager_no] ) ) {
|
301 |
-
$remove_pager = '/comment-page-' . $check_pager[$get_pager_no];
|
302 |
-
$request_noslash = str_replace( $remove_pager, '', $request_noslash );
|
303 |
-
}
|
304 |
-
}
|
305 |
-
|
306 |
-
if ( false !== strpos( $request_noslash, '/feed' ) ) {
|
307 |
-
$request_noslash = str_replace( '/feed', '', $request_noslash );
|
308 |
-
}
|
309 |
-
|
310 |
$sql = $wpdb->prepare( "SELECT p.ID, pm.meta_value, p.post_type, p.post_status " .
|
311 |
" FROM $wpdb->posts AS p INNER JOIN $wpdb->postmeta AS pm ON (pm.post_id = p.ID) " .
|
312 |
" WHERE pm.meta_key = 'custom_permalink' " .
|
80 |
$cp_form = new Custom_Permalinks_Form();
|
81 |
$request = $cp_form->custom_permalinks_check_conflicts( $request );
|
82 |
}
|
83 |
+
$request_noslash = preg_replace( '@/+@','/', trim( $request, '/' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
$sql = $wpdb->prepare( "SELECT p.ID, pm.meta_value, p.post_type, p.post_status " .
|
86 |
" FROM $wpdb->posts AS p INNER JOIN $wpdb->postmeta AS pm ON (pm.post_id = p.ID) " .
|
134 |
str_replace( $post_meta, $get_original_url, strtolower( $request_noslash ) )
|
135 |
);
|
136 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
}
|
138 |
}
|
139 |
|
253 |
}
|
254 |
$request_noslash = preg_replace( '@/+@','/', trim( $request, '/' ) );
|
255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
$sql = $wpdb->prepare( "SELECT p.ID, pm.meta_value, p.post_type, p.post_status " .
|
257 |
" FROM $wpdb->posts AS p INNER JOIN $wpdb->postmeta AS pm ON (pm.post_id = p.ID) " .
|
258 |
" WHERE pm.meta_key = 'custom_permalink' " .
|
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
|
5 |
Requires at least: 2.6
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 1.2.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl.html
|
10 |
|
@@ -93,6 +93,13 @@ This process defines you the steps to follow either you are installing through W
|
|
93 |
|
94 |
== Changelog ==
|
95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
= 1.2.19 - April 10, 2018 =
|
97 |
|
98 |
* Bugs
|
4 |
Tags: permalink, url, link, address, custom, redirect, custom post type
|
5 |
Requires at least: 2.6
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 1.2.20
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl.html
|
10 |
|
93 |
|
94 |
== Changelog ==
|
95 |
|
96 |
+
= 1.2.20 - April 11, 2018 =
|
97 |
+
|
98 |
+
* Bug
|
99 |
+
* Removed extra code which was written for the equal query.
|
100 |
+
For further details:
|
101 |
+
https://wordpress.org/support/topic/page-not-found-404-errors-after-latest-update/
|
102 |
+
|
103 |
= 1.2.19 - April 10, 2018 =
|
104 |
|
105 |
* Bugs
|