Skip to content

Commit

Permalink
🐛 Fix issue showing error in custom taxonomies when option Custom Tax…
Browse files Browse the repository at this point in the history
…onomy Order is not enabled.
  • Loading branch information
daomapsieucap committed Jul 25, 2022
1 parent 0508c27 commit e9e5dda
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
== Changelog ==

= 2.0.10 =
*Release Date - 25 July 2022*

* Fixed: Fix issue showing error in custom taxonomies when option Custom Taxonomy Order is not enabled.

= 2.0.9 =
*Release Date - 20 June 2022*

Expand Down
9 changes: 7 additions & 2 deletions fiberadmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Fiber Admin
* Plugin URI: https://wordpress.org/plugins/fiber-admin/
* Description: 💈 Bring multiple customization features to make your own WordPress admin.
* Version: 2.0.9
* Version: 2.0.10
* Requires at least: 5.2
* Requires PHP: 7.0
* Author: Dao
Expand All @@ -25,7 +25,12 @@
* Definitions
*/

const FIBERADMIN_VERSION = '2.0.9';
if(!function_exists('get_plugin_data')){
require_once(ABSPATH . 'wp-admin/includes/plugin.php');
}
$plugin_data = get_plugin_data(__FILE__);

define("FIBERADMIN_VERSION", $plugin_data['Version']);
const FIBERADMIN_DEV_MODE = false;
const FIBERADMIN_FILENAME = __FILE__;
define("FIBERADMIN_DIR", plugin_dir_path(__FILE__));
Expand Down
6 changes: 6 additions & 0 deletions includes/cpo.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ public function fiad_get_terms_args($args, $taxonomies){
}

public function fiad_cpo_create_term_order($term_id, $tt_id, $taxonomy){
if(!fiad_get_cpo_option('taxonomies')){
return false;
}

global $wpdb;

if(in_array($taxonomy, fiad_get_cpo_option('taxonomies'))){
Expand All @@ -245,6 +249,8 @@ public function fiad_cpo_create_term_order($term_id, $tt_id, $taxonomy){

$wpdb->update($wpdb->terms, array('term_order' => $order_start + 1), array('term_id' => $term_id));
}

return false;
}
}

Expand Down
11 changes: 5 additions & 6 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Contributors: daomapsieucap
Tags: white label, admin tool, duplicate post, content protection
Requires at least: 4.7
Tested up to: 5.9.3
Tested up to: 6.0.1
Requires PHP: 7.0
Stable tag: 2.0.9
Stable tag: 2.0.10
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -46,8 +46,7 @@ At the first time using this setting, Fiber Admin will ask you to save it to cre

== Changelog ==

= 2.0.9 =
*Release Date - 20 June 2022*
= 2.0.10 =
*Release Date - 25 July 2022*

* Fixed: Missing `stripslashes` when displaying DB Error message.
* Fixed: Fix issue custom term order not working when creating new item.
* Fixed: Fix issue showing error in custom taxonomies when option Custom Taxonomy Order is not enabled.

0 comments on commit e9e5dda

Please sign in to comment.