Skip to content

Commit

Permalink
Merge pull request #30 from stuttter/issue/29
Browse files Browse the repository at this point in the history
issue/29 - Define some object vars
  • Loading branch information
JJJ authored Mar 10, 2024
2 parents 6564b1c + 2cbd4dd commit 0e9984a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9Q4F4EL5YJ62J
Requires at least: 4.3
Tested up to: 5.5
Stable tag: 2.0.0
Tested up to: 6.5
Stable tag: 2.1.0

== Description ==

Expand Down Expand Up @@ -58,6 +58,10 @@ http://github.com/stuttter/wp-term-order/

== Changelog ==

= 2.1.0 =
* PHP8 support
*

= 2.0.0 =
* Migrate existing order data to term meta on upgrade
* Fix order override when querying for terms
Expand Down
25 changes: 20 additions & 5 deletions wp-term-order.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* License: GPL v2 or later
* Requires PHP: 5.6.20
* Requires at least: 5.3
* Version: 2.0.0
* Version: 2.1.0
*/

// Exit if accessed directly
Expand All @@ -29,12 +29,12 @@ final class WP_Term_Order {
/**
* @var string Plugin version
*/
public $version = '2.0.0';
public $version = '2.1.0';

/**
* @var string Database version
*/
public $db_version = 202106140001;
public $db_version = 202303100001;

/**
* @var string Database version
Expand Down Expand Up @@ -76,6 +76,21 @@ final class WP_Term_Order {
*/
public $fancy = true;

/**
* @var WP_Meta_Query Meta query arguments
*/
public $meta_query = false;

/**
* @var array Term query clauses
*/
public $term_clauses = array();

/**
* @var array Term query clauses
*/
public $meta_clauses = array();

/**
* Empty constructor
*
Expand Down Expand Up @@ -156,10 +171,10 @@ public function init() {
add_action( 'wp_ajax_reordering_terms', array( $this, 'ajax_reordering_terms' ) );

// Only blog admin screens
if ( is_blog_admin() || doing_action( 'wp_ajax_inline_save_tax' ) || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
if ( is_blog_admin() || doing_action( 'wp_ajax_inline_save_tax' ) || defined( 'WP_CLI' ) ) {
add_action( 'admin_init', array( $this, 'admin_init' ) );

// Bail if taxonomy does not include colors
// Proceed only if taxonomy supported
if ( ! empty( $_REQUEST['taxonomy'] ) && $this->taxonomy_supported( $_REQUEST['taxonomy'] ) && ! defined( 'WP_CLI' ) ) {
add_action( 'load-edit-tags.php', array( $this, 'edit_tags' ) );
}
Expand Down

0 comments on commit 0e9984a

Please sign in to comment.