Permalink Manager Lite - Version 2.2.5

Version Description

Download this release

Release Info

Developer mbis
Plugin Icon 128x128 Permalink Manager Lite
Version 2.2.5
Comparing to
See all releases

Code changes from version 2.2.4 to 2.2.5

README.txt CHANGED
@@ -26,11 +26,11 @@ The plugin supports all custom post types & custom taxonomies and popular 3rd pa
26
  * **Auto-redirect**<br/>Old (native) permalinks are redirected to new (custom) permalinks (in 301 or 302 mode) to prevent 404 error (SEO friendly).
27
  * **Canonical redirects**<br/>Possibility to disable native canonical redirects.
28
  * **Bulk editors**<br/>"Regenerate/Reset" + "Find and replace" tools that allow to bulk/mass change the permalinks (or native slugs).
29
- * **Trailing slashes settings**<br/>They can be forced or removed from all permalinks.
30
-
31
- = Need additional features & priority support? =
32
- Buy <a href="https://permalinkmanager.pro?utm_source=wordpress">Permalink Manager Pro here</a>.
33
 
 
 
 
34
  = Additional features available in Permalink Manager Pro =
35
 
36
  * **Taxonomies**<br/>Full support for taxonomies (categories, tags & custom taxonomies).
26
  * **Auto-redirect**<br/>Old (native) permalinks are redirected to new (custom) permalinks (in 301 or 302 mode) to prevent 404 error (SEO friendly).
27
  * **Canonical redirects**<br/>Possibility to disable native canonical redirects.
28
  * **Bulk editors**<br/>"Regenerate/Reset" + "Find and replace" tools that allow to bulk/mass change the permalinks (or native slugs).
29
+ * **Trailing slashes settings**<br/>They can be forced or removed from all permalinks.
 
 
 
30
 
31
+ = Need additional features & priority support? =
32
+ Buy <a href="https://permalinkmanager.pro?utm_source=wordpress">Permalink Manager Pro here</a>.
33
+
34
  = Additional features available in Permalink Manager Pro =
35
 
36
  * **Taxonomies**<br/>Full support for taxonomies (categories, tags & custom taxonomies).
includes/core/permalink-manager-core-functions.php CHANGED
@@ -216,8 +216,7 @@ class Permalink_Manager_Core_Functions extends Permalink_Manager_Class {
216
 
217
  //$query["term"] = $final_uri;
218
  $query["term"] = $term->slug;
219
- //$query[$query_parameter] = $final_uri;
220
- $query[$query_parameter] = $term->slug;
221
  } else {
222
  $broken_uri = true;
223
  }
@@ -256,13 +255,9 @@ class Permalink_Manager_Core_Functions extends Permalink_Manager_Class {
256
 
257
  // Alter query parameters + support drafts URLs
258
  if($post_to_load->post_status == 'draft' || empty($final_uri)) {
259
- if(is_user_logged_in()) {
260
- $query['p'] = $element_id;
261
- $query['preview'] = true;
262
- $query['post_type'] = $post_type;
263
- } else {
264
- $query = $old_query;
265
- }
266
  } else if($post_type == 'page') {
267
  $query['pagename'] = $final_uri;
268
  // $query['post_type'] = $post_type;
@@ -631,7 +626,7 @@ class Permalink_Manager_Core_Functions extends Permalink_Manager_Class {
631
  if(isset($_REQUEST['debug_redirect'])) {
632
  $debug_info['query_vars'] = $wp_query->query_vars;
633
  $debug_info['redirect_url'] = (!empty($correct_permalink)) ? $correct_permalink : '-';
634
- $debug_info['redirect_type'] = (!empty($redirect_type)) ? $redirect_type : "-";
635
  $debug_info['queried_object'] = (!empty($queried_object)) ? $queried_object : "-";
636
 
637
  $debug_txt = sprintf("<pre style=\"display:block;\">%s</pre>", print_r($debug_info, true));
216
 
217
  //$query["term"] = $final_uri;
218
  $query["term"] = $term->slug;
219
+ $query[$query_parameter] = $final_uri;
 
220
  } else {
221
  $broken_uri = true;
222
  }
255
 
256
  // Alter query parameters + support drafts URLs
257
  if($post_to_load->post_status == 'draft' || empty($final_uri)) {
258
+ $query['p'] = $element_id;
259
+ $query['preview'] = true;
260
+ $query['post_type'] = $post_type;
 
 
 
 
261
  } else if($post_type == 'page') {
262
  $query['pagename'] = $final_uri;
263
  // $query['post_type'] = $post_type;
626
  if(isset($_REQUEST['debug_redirect'])) {
627
  $debug_info['query_vars'] = $wp_query->query_vars;
628
  $debug_info['redirect_url'] = (!empty($correct_permalink)) ? $correct_permalink : '-';
629
+ $debug_info['redirect_mode'] = (!empty($redirect_mode)) ? $redirect_mode : "-";
630
  $debug_info['queried_object'] = (!empty($queried_object)) ? $queried_object : "-";
631
 
632
  $debug_txt = sprintf("<pre style=\"display:block;\">%s</pre>", print_r($debug_info, true));
includes/core/permalink-manager-helper-functions.php CHANGED
@@ -136,9 +136,9 @@ class Permalink_Manager_Helper_Functions extends Permalink_Manager_Class {
136
 
137
  static function content_types_disabled_by_default($is_taxonomy = false) {
138
  if($is_taxonomy) {
139
- return array('product_shipping_class', 'post_status');
140
  } else {
141
- return array('revision', 'algolia_task', 'fl_builder', 'fl-builder', 'fl-theme-layout', 'wc_product_tab', 'wc_voucher', 'wc_voucher_template', 'sliders', 'thirstylink', 'elementor_library', 'cms_block');
142
  }
143
  }
144
 
136
 
137
  static function content_types_disabled_by_default($is_taxonomy = false) {
138
  if($is_taxonomy) {
139
+ return array('product_shipping_class');
140
  } else {
141
+ return array('revision', 'algolia_task', 'fl_builder', 'fl-builder', 'fl-theme-layout', 'wc_product_tab', 'wc_voucher', 'wc_voucher_template', 'sliders', 'thirstylink');
142
  }
143
  }
144
 
permalink-manager.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Permalink Manager Lite
5
  * Plugin URI: https://permalinkmanager.pro?utm_source=plugin
6
  * Description: Advanced plugin that allows to set-up custom permalinks (bulk editors included), slugs and permastructures (WooCommerce compatible).
7
- * Version: 2.2.4
8
  * Author: Maciej Bis
9
  * Author URI: http://maciejbis.net/
10
  * License: GPL-2.0+
@@ -21,7 +21,7 @@ if (!defined('WPINC')) {
21
  // Define the directories used to load plugin files.
22
  define( 'PERMALINK_MANAGER_PLUGIN_NAME', 'Permalink Manager' );
23
  define( 'PERMALINK_MANAGER_PLUGIN_SLUG', 'permalink-manager' );
24
- define( 'PERMALINK_MANAGER_VERSION', '2.2.4' );
25
  define( 'PERMALINK_MANAGER_FILE', __FILE__ );
26
  define( 'PERMALINK_MANAGER_DIR', untrailingslashit(dirname(__FILE__)) );
27
  define( 'PERMALINK_MANAGER_BASENAME', dirname(plugin_basename(__FILE__)));
4
  * Plugin Name: Permalink Manager Lite
5
  * Plugin URI: https://permalinkmanager.pro?utm_source=plugin
6
  * Description: Advanced plugin that allows to set-up custom permalinks (bulk editors included), slugs and permastructures (WooCommerce compatible).
7
+ * Version: 2.2.3
8
  * Author: Maciej Bis
9
  * Author URI: http://maciejbis.net/
10
  * License: GPL-2.0+
21
  // Define the directories used to load plugin files.
22
  define( 'PERMALINK_MANAGER_PLUGIN_NAME', 'Permalink Manager' );
23
  define( 'PERMALINK_MANAGER_PLUGIN_SLUG', 'permalink-manager' );
24
+ define( 'PERMALINK_MANAGER_VERSION', '2.2.3' );
25
  define( 'PERMALINK_MANAGER_FILE', __FILE__ );
26
  define( 'PERMALINK_MANAGER_DIR', untrailingslashit(dirname(__FILE__)) );
27
  define( 'PERMALINK_MANAGER_BASENAME', dirname(plugin_basename(__FILE__)));