Skip to content

Commit

Permalink
v1.1.1 - Fixed: Issue with custom taxonomy when enabling Custom Post …
Browse files Browse the repository at this point in the history
…Order
  • Loading branch information
daomapsieucap committed Sep 21, 2021
1 parent ca27341 commit ac9125d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## 1.1.1 - 2021-09-21

* Fixed: Issue with custom taxonomy when enabling Custom Post Order

## 1.1 - 2021-09-16

* New: Duplicate post feature
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
== Changelog ==

= 1.1.1 =
*Release Date - 21 September 2021*
* Fixed: Issue with custom taxonomy when enabling Custom Post Order

= 1.1 =
*Release Date - 16 September 2021*

Expand Down
4 changes: 2 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: 💈 Another helpful tool for WordPress admin
* Version: 1.1
* Version: 1.1.1
* Requires at least: 5.2
* Requires PHP: 7.2
* Author: Dao Chau
Expand All @@ -25,7 +25,7 @@
* Definitions
*/

define('FIBERADMIN_VERSION', '1.1');
define('FIBERADMIN_VERSION', '1.1.1');
define("FIBERADMIN_DIR", plugin_dir_path(__FILE__));
define("FIBERADMIN_ASSETS_URL", plugin_dir_url(__FILE__) . 'assets/');

Expand Down
8 changes: 5 additions & 3 deletions includes/cpo.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ public function fiad_cpo_update_order($query){
if($query->is_main_query()){
if(is_admin()){
// Change post order by default in admin
if(fiad_is_screen_sortable()){
$screen = get_current_screen();
if(fiad_is_screen_sortable() && !$screen->taxonomy){
$query->set('orderby', 'menu_order');
$query->set('order', 'ASC');
}
Expand Down Expand Up @@ -166,8 +167,9 @@ public function fiad_cpo_tax_update(){

public function fiad_cpo_update_term_order($orderby, $query_vars, $taxonomies){
if(is_admin()){
// Change post order by default in admin
if(fiad_is_screen_sortable()){
// Change taxonomy order by default in admin
$screen = get_current_screen();
if(fiad_is_screen_sortable() && $screen->taxonomy){
return 't.term_order';
}
}else{
Expand Down
8 changes: 4 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: white label, admin login, admin tool
Requires at least: 4.7
Tested up to: 5.8
Requires PHP: 5.6
Stable tag: 1.1
Stable tag: 1.1.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -35,7 +35,7 @@ Another helpful tool for WordPress admin help you do more cool things in WordPre

== Changelog ==

= 1.1 =
*Release Date - 16 September 2021*
= 1.1.1 =
*Release Date - 21 September 2021*

* New: Duplicate post feature
* Fixed: Issue with custom taxonomy when enabling Custom Post Order

0 comments on commit ac9125d

Please sign in to comment.