Remove Category URL - Version 1.1.4

Version Description

  • Update Fix WPML
Download this release

Release Info

Developer valeriosza
Plugin Icon 128x128 Remove Category URL
Version 1.1.4
Comparing to
See all releases

Code changes from version 1.1.3 to 1.1.4

Files changed (2) hide show
  1. readme.txt +4 -1
  2. remove-category-url.php +4 -4
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: valeriosza
3
  Tags: categories, category base, category, permalinks, URL structure, links, seo, cms, wpml, URL
4
  Requires at least: 3.1
5
  Tested up to: 5.2.2
6
- Stable tag: 1.1.3
7
  License: GPLv2
8
  Donate link:
9
 
@@ -63,6 +63,9 @@ A particular installation does not allow the rewrite feature in disabling the pl
63
 
64
  == Changelog ==
65
 
 
 
 
66
  = 1.1.3 =
67
  * Update Fix
68
 
3
  Tags: categories, category base, category, permalinks, URL structure, links, seo, cms, wpml, URL
4
  Requires at least: 3.1
5
  Tested up to: 5.2.2
6
+ Stable tag: 1.1.4
7
  License: GPLv2
8
  Donate link:
9
 
63
 
64
  == Changelog ==
65
 
66
+ = 1.1.4 =
67
+ * Update Fix WPML
68
+
69
  = 1.1.3 =
70
  * Update Fix
71
 
remove-category-url.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Remove Category URL
4
  * Plugin URI: http://valeriosouza.com.br/portfolio/remove-category-url/
5
  * Description: This plugin removes '/category' from your category permalinks. (e.g. `/category/my-category/` to `/my-category/`)
6
- * Version: 1.1.3
7
  * Author: Valerio Souza
8
  * Author URI: http://valeriosouza.com.br/
9
  * Text Domain: remove-category-url
@@ -67,9 +67,9 @@ function remove_category_url_rewrite_rules( $category_rewrite ) {
67
  if ( class_exists( 'Sitepress' ) ) {
68
  global $sitepress;
69
 
70
- remove_filter( 'terms_clauses', array( $sitepress, 'terms_clauses' ) );
71
  $categories = get_categories( array( 'hide_empty' => false, '_icl_show_all_langs' => true ) );
72
- add_filter( 'terms_clauses', array( $sitepress, 'terms_clauses' ) );
73
  } else {
74
  $categories = get_categories( array( 'hide_empty' => false ) );
75
  }
@@ -127,4 +127,4 @@ function remove_category_url_plugin_row_meta( $links, $file ) {
127
  );
128
  }
129
  return $links;
130
- }
3
  * Plugin Name: Remove Category URL
4
  * Plugin URI: http://valeriosouza.com.br/portfolio/remove-category-url/
5
  * Description: This plugin removes '/category' from your category permalinks. (e.g. `/category/my-category/` to `/my-category/`)
6
+ * Version: 1.1.4
7
  * Author: Valerio Souza
8
  * Author URI: http://valeriosouza.com.br/
9
  * Text Domain: remove-category-url
67
  if ( class_exists( 'Sitepress' ) ) {
68
  global $sitepress;
69
 
70
+ remove_filter('terms_clauses', array($sitepress, 'terms_clauses'),10 );
71
  $categories = get_categories( array( 'hide_empty' => false, '_icl_show_all_langs' => true ) );
72
+ add_filter( 'terms_clauses', array( $sitepress, 'terms_clauses' ), 10, 4 );
73
  } else {
74
  $categories = get_categories( array( 'hide_empty' => false ) );
75
  }
127
  );
128
  }
129
  return $links;
130
+ }