Custom Permalinks - Version 1.5.1

Version Description

  • Jun 11, 2019 =

    • Bugs
    • Added additional check for Call to undefined function pll_current_language
Download this release

Release Info

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

Code changes from version 1.5.0 to 1.5.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.5.0
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.5.0' );
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.5.1
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.5.1' );
68
  }
69
 
70
  if ( ! defined( 'CUSTOM_PERMALINKS_PATH' ) ) {
frontend/class-custom-permalinks-form.php CHANGED
@@ -489,7 +489,7 @@ class Custom_Permalinks_Form {
489
  *
490
  * @access public
491
  * @since 1.2
492
- * @updated 1.5.0
493
  *
494
  * @return string
495
  */
@@ -512,11 +512,14 @@ class Custom_Permalinks_Form {
512
  * If true the remove the lang code from the url.
513
  */
514
  if ( 1 == $polylang_config['hide_default'] ) {
515
- // get current language
516
- $current_language = pll_current_language();
 
 
 
517
 
518
  // get defualt language
519
- $default_language = pll_default_language();
520
 
521
  if ( $current_language !== $default_language ) {
522
  $remove_lang = ltrim( strstr( $requested_url, '/' ), '/' );
489
  *
490
  * @access public
491
  * @since 1.2
492
+ * @updated 1.5.1
493
  *
494
  * @return string
495
  */
512
  * If true the remove the lang code from the url.
513
  */
514
  if ( 1 == $polylang_config['hide_default'] ) {
515
+ $current_language = '';
516
+ if ( function_exists( 'pll_current_language' ) ) {
517
+ // get current language
518
+ $current_language = pll_current_language();
519
+ }
520
 
521
  // get defualt language
522
+ $default_language = $polylang_config['default_lang'];
523
 
524
  if ( $current_language !== $default_language ) {
525
  $remove_lang = ltrim( strstr( $requested_url, '/' ), '/' );
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: 5.2
7
- Stable tag: 1.5.0
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl.html
10
 
@@ -97,6 +97,11 @@ This process defines you the steps to follow either you are installing through W
97
 
98
  == Changelog ==
99
 
 
 
 
 
 
100
  = 1.5.0 - Jun 04, 2019 =
101
 
102
  * Bugs
4
  Tags: permalink, url, link, address, custom, redirect, custom post type, GDPR, GDPR Compliant
5
  Requires at least: 2.6
6
  Tested up to: 5.2
7
+ Stable tag: 1.5.1
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl.html
10
 
97
 
98
  == Changelog ==
99
 
100
+ = 1.5.1 - Jun 11, 2019 =
101
+
102
+ * Bugs
103
+ * Added additional check for [Call to undefined function pll_current_language](https://wordpress.org/support/topic/call-to-undefined-function-pll_current_language/)
104
+
105
  = 1.5.0 - Jun 04, 2019 =
106
 
107
  * Bugs