X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/03f2fa83c13c1b532284205fa7efcab9b8b2c41f..073c5ed6408e2f00dc1863b463fe205467628905:/wp-includes/class-wp-tax-query.php diff --git a/wp-includes/class-wp-tax-query.php b/wp-includes/class-wp-tax-query.php index 356b6929..9bff196f 100644 --- a/wp-includes/class-wp-tax-query.php +++ b/wp-includes/class-wp-tax-query.php @@ -24,7 +24,7 @@ class WP_Tax_Query { /** * Array of taxonomy queries. * - * See {@see WP_Tax_Query::__construct()} for information on tax query arguments. + * See WP_Tax_Query::__construct() for information on tax query arguments. * * @since 3.1.0 * @access public @@ -440,7 +440,7 @@ class WP_Tax_Query { // Store the alias with this clause, so later siblings can use it. $clause['alias'] = $alias; - $join .= " INNER JOIN $wpdb->term_relationships"; + $join .= " LEFT JOIN $wpdb->term_relationships"; $join .= $i ? " AS $alias" : ''; $join .= " ON ($this->primary_table.$this->primary_id_column = $alias.object_id)"; } @@ -557,19 +557,19 @@ class WP_Tax_Query { * @since 3.2.0 * @access private * - * @param array &$query The single query. + * @param array $query The single query. Passed by reference. */ private function clean_query( &$query ) { if ( empty( $query['taxonomy'] ) ) { if ( 'term_taxonomy_id' !== $query['field'] ) { - $query = new WP_Error( 'Invalid taxonomy' ); + $query = new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); return; } // so long as there are shared terms, include_children requires that a taxonomy is set $query['include_children'] = false; } elseif ( ! taxonomy_exists( $query['taxonomy'] ) ) { - $query = new WP_Error( 'Invalid taxonomy' ); + $query = new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) ); return; } @@ -599,7 +599,7 @@ class WP_Tax_Query { * * @global wpdb $wpdb The WordPress database abstraction object. * - * @param array &$query The single query. + * @param array $query The single query. Passed by reference. * @param string $resulting_field The resulting field. Accepts 'slug', 'name', 'term_taxonomy_id', * or 'term_id'. Default 'term_id'. */ @@ -655,7 +655,7 @@ class WP_Tax_Query { } if ( 'AND' == $query['operator'] && count( $terms ) < count( $query['terms'] ) ) { - $query = new WP_Error( 'Inexistent terms' ); + $query = new WP_Error( 'inexistent_terms', __( 'Inexistent terms.' ) ); return; }