WordPress.org

Make WordPress Core

Changeset 38079


Ignore:
Timestamp:
07/17/2016 04:32:50 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Taxonomy: Correct WP_Error usage in WP_Tax_Query::clean_query() and WP_Tax_Query::transform_query().

Fixes #37389.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-tax-query.php

    r37342 r38079  
    563563        if ( empty( $query['taxonomy'] ) ) {
    564564            if ( 'term_taxonomy_id' !== $query['field'] ) {
    565                 $query = new WP_Error( 'Invalid taxonomy' );
     565                $query = new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
    566566                return;
    567567            }
     
    570570            $query['include_children'] = false;
    571571        } elseif ( ! taxonomy_exists( $query['taxonomy'] ) ) {
    572             $query = new WP_Error( 'Invalid taxonomy' );
     572            $query = new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
    573573            return;
    574574        }
     
    656656
    657657        if ( 'AND' == $query['operator'] && count( $terms ) < count( $query['terms'] ) ) {
    658             $query = new WP_Error( 'Inexistent terms' );
     658            $query = new WP_Error( 'inexistent_terms', __( 'Inexistent terms.' ) );
    659659            return;
    660660        }
Note: See TracChangeset for help on using the changeset viewer.