Version Description
- Hotfix for bulk actions' functions - additional conditional check for arrays added.
Download this release
Release Info
Developer | mbis |
Plugin | Permalink Manager Lite |
Version | 0.4.2 |
Comparing to | |
See all releases |
Code changes from version 0.4.1 to 0.4.2
- README.txt +5 -2
- inc/permalink-manager-actions.php +6 -6
- permalink-manager.php +1 -1
README.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: mbis
|
|
3 |
Tags: urls, permalinks, slugs, custom url, custom permalinks, uris, url, slug, permalink
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.5.3
|
6 |
-
Stable tag: 0.4.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -82,8 +82,11 @@ After the plugin is installed you can access its dashboard from this page: `Tool
|
|
82 |
|
83 |
== Changelog ==
|
84 |
|
|
|
|
|
|
|
85 |
= 0.4.1 =
|
86 |
-
* Hotfix for "Edit Post" URI input (the URIs were reseted after "Update" button was pressed).
|
87 |
|
88 |
= 0.4 =
|
89 |
* Rewrite rules are no longer used (SQL queries are optimized). The plugin uses now 'request' filter to detect the page/post that should be loaded instead.
|
3 |
Tags: urls, permalinks, slugs, custom url, custom permalinks, uris, url, slug, permalink
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.5.3
|
6 |
+
Stable tag: 0.4.2
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
82 |
|
83 |
== Changelog ==
|
84 |
|
85 |
+
= 0.4.2 =
|
86 |
+
* Hotfix for bulk actions' functions - additional conditional check for arrays added.
|
87 |
+
|
88 |
= 0.4.1 =
|
89 |
+
* Hotfix for "Edit Post" URI input (the URIs were reseted after "Update" button was pressed).
|
90 |
|
91 |
= 0.4 =
|
92 |
* Rewrite rules are no longer used (SQL queries are optimized). The plugin uses now 'request' filter to detect the page/post that should be loaded instead.
|
inc/permalink-manager-actions.php
CHANGED
@@ -18,7 +18,7 @@ class Permalink_Manager_Actions extends Permalink_Manager_Class {
|
|
18 |
$updated_slugs_count = 0;
|
19 |
$updated_array = array();
|
20 |
$alert_type = $alert_content = $errors = $main_content = '';
|
21 |
-
$old_uris = get_option('permalink-manager-uris');
|
22 |
|
23 |
// Prepare default variables from $_POST object
|
24 |
$old_string = esc_sql($_POST['permalink-manager']['find-replace']['old_string']);
|
@@ -87,8 +87,8 @@ class Permalink_Manager_Actions extends Permalink_Manager_Class {
|
|
87 |
$post_statuses_array = ($_POST['permalink-manager']['regenerate_slugs']['post_statuses']);
|
88 |
$mode = isset($_POST['permalink-manager']['regenerate_slugs']['variant']) ? $_POST['permalink-manager']['regenerate_slugs']['variant'] : array('slugs');
|
89 |
|
90 |
-
$old_uris = get_option('permalink-manager-uris');
|
91 |
-
$all_permastructs = get_option('permalink-manager-permastructs');
|
92 |
|
93 |
// Reset query
|
94 |
$reset_query = new WP_Query( array( 'post_type' => $post_types_array, 'post_status' => $post_statuses_array, 'posts_per_page' => -1 ) );
|
@@ -130,7 +130,7 @@ class Permalink_Manager_Actions extends Permalink_Manager_Class {
|
|
130 |
}
|
131 |
|
132 |
// Do not store default values
|
133 |
-
if($new_uri == $old_default_uri) {
|
134 |
unset($old_uris[$post_id]);
|
135 |
}
|
136 |
}
|
@@ -155,7 +155,7 @@ class Permalink_Manager_Actions extends Permalink_Manager_Class {
|
|
155 |
$updated_array = array();
|
156 |
$alert_type = $alert_content = $errors = $main_content = '';
|
157 |
|
158 |
-
$old_uris = get_option('permalink-manager-uris');
|
159 |
$new_uris = isset($_POST['uri']) ? $_POST['uri'] : array();
|
160 |
|
161 |
// Double check if the slugs and ids are stored in arrays
|
@@ -209,7 +209,7 @@ class Permalink_Manager_Actions extends Permalink_Manager_Class {
|
|
209 |
static function update_permastructs() {
|
210 |
// Setup needed variables
|
211 |
$alert_type = $alert_content = $errors = $main_content = '';
|
212 |
-
$old_permastructs = get_option('permalink-manager-permastructs');
|
213 |
$new_permastructs = array_filter($_POST['permalink-manager']['custom-permastructs']);
|
214 |
|
215 |
foreach($new_permastructs as $post_type => $new_permstruct) {
|
18 |
$updated_slugs_count = 0;
|
19 |
$updated_array = array();
|
20 |
$alert_type = $alert_content = $errors = $main_content = '';
|
21 |
+
$old_uris = (is_array(get_option('permalink-manager-uris'))) ? get_option('permalink-manager-uris') : array();
|
22 |
|
23 |
// Prepare default variables from $_POST object
|
24 |
$old_string = esc_sql($_POST['permalink-manager']['find-replace']['old_string']);
|
87 |
$post_statuses_array = ($_POST['permalink-manager']['regenerate_slugs']['post_statuses']);
|
88 |
$mode = isset($_POST['permalink-manager']['regenerate_slugs']['variant']) ? $_POST['permalink-manager']['regenerate_slugs']['variant'] : array('slugs');
|
89 |
|
90 |
+
$old_uris = (is_array(get_option('permalink-manager-uris'))) ? get_option('permalink-manager-uris') : array();
|
91 |
+
$all_permastructs = (is_array(get_option('permalink-manager-permastructs'))) ? get_option('permalink-manager-permastructs') : array();
|
92 |
|
93 |
// Reset query
|
94 |
$reset_query = new WP_Query( array( 'post_type' => $post_types_array, 'post_status' => $post_statuses_array, 'posts_per_page' => -1 ) );
|
130 |
}
|
131 |
|
132 |
// Do not store default values
|
133 |
+
if($new_uri == $old_default_uri && is_array($old_uris)) {
|
134 |
unset($old_uris[$post_id]);
|
135 |
}
|
136 |
}
|
155 |
$updated_array = array();
|
156 |
$alert_type = $alert_content = $errors = $main_content = '';
|
157 |
|
158 |
+
$old_uris = (is_array(get_option('permalink-manager-uris'))) ? get_option('permalink-manager-uris') : array();
|
159 |
$new_uris = isset($_POST['uri']) ? $_POST['uri'] : array();
|
160 |
|
161 |
// Double check if the slugs and ids are stored in arrays
|
209 |
static function update_permastructs() {
|
210 |
// Setup needed variables
|
211 |
$alert_type = $alert_content = $errors = $main_content = '';
|
212 |
+
$old_permastructs = (is_array(get_option('permalink-manager-permastructs'))) ? get_option('permalink-manager-permastructs') : array();
|
213 |
$new_permastructs = array_filter($_POST['permalink-manager']['custom-permastructs']);
|
214 |
|
215 |
foreach($new_permastructs as $post_type => $new_permstruct) {
|
permalink-manager.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Permalink Manager
|
5 |
* Plugin URI: http://maciejbis.net/
|
6 |
* Description: A simple tool that allows to mass update of slugs that are used to build permalinks for Posts, Pages and Custom Post Types.
|
7 |
-
* Version: 0.4.
|
8 |
* Author: Maciej Bis
|
9 |
* Author URI: http://maciejbis.net/
|
10 |
* License: GPL-2.0+
|
4 |
* Plugin Name: Permalink Manager
|
5 |
* Plugin URI: http://maciejbis.net/
|
6 |
* Description: A simple tool that allows to mass update of slugs that are used to build permalinks for Posts, Pages and Custom Post Types.
|
7 |
+
* Version: 0.4.2
|
8 |
* Author: Maciej Bis
|
9 |
* Author URI: http://maciejbis.net/
|
10 |
* License: GPL-2.0+
|