Plugin Directory

Changeset 2570595


Ignore:
Timestamp:
07/23/2021 06:29:29 AM (4 years ago)
Author:
landonbotis
Message:

Added 1.0.2 which fixes issues with an empty option hiding all terms.

Location:
wp-term-manager
Files:
474 added
3 edited

Legend:

Unmodified
Added
Removed
  • wp-term-manager/trunk/includes/Settings.php

    r2570566 r2570595  
    140140     */
    141141    public function exclude_terms( $exclusions, $args ) {
    142 
     142       
    143143        if ( ! is_admin() ) {
    144144            return;
     
    147147        $screen = get_current_screen();
    148148
    149         if ( 'tools_page_wptm_settings' == $screen->id ) {
     149        if ( 'tools_page_wptm_settings' === $screen->id ) {
    150150            return;
    151151        }
     
    153153        $settings = get_option( 'wptm_settings' );
    154154        $terms    = $settings['exclude'];
     155
    155156        if ( is_array( $terms ) ) {
    156157            $terms = implode( ',', array_map( 'intval', $terms ) );
    157158        }
    158159
    159         $exclusions = 't.term_id NOT IN (' . $terms . ')';
     160        if ( ! empty( $terms ) ) {
     161            $exclusions = 't.term_id NOT IN (' . $terms . ')';
     162        }
    160163
    161164        return $exclusions;
     
    166169        $option   = $settings['clean_db'];
    167170
    168         if ( 'on' != $option ) {
     171        if ( 'on' !== $option ) {
    169172            return;
    170173        }
  • wp-term-manager/trunk/readme.txt

    r2570566 r2570595  
    66Tested up to: 5.8
    77Requires PHP: 5.6
    8 Stable tag: 1.0.1
     8Stable tag: 1.0.2
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3131
    3232== Changelog ==
     33= 1.0.2 - 07-22-2021 =
     34* Fixed issue where all terms were being hidden if none were selected.
    3335= 1.0.1 - 07-22-2021 =
    3436* Code cleanup.
  • wp-term-manager/trunk/wp-term-manager.php

    r2570567 r2570595  
    55 * Plugin URL: https://scree.it/wp-term-manager
    66 * Description: Clean up terms for easier administration.
    7  * Version: 1.0.1
     7 * Version: 1.0.2
    88 * Author: Landon Otis
    99 * Author URI: https://scree.it
Note: See TracChangeset for help on using the changeset viewer.