mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
The keyword elseif should be used instead of else if so that all control keywords look like single words.
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs. See #30799. git-svn-id: https://develop.svn.wordpress.org/trunk@31090 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -995,11 +995,11 @@ class WP_Meta_Query {
|
||||
if ( 'relation' === $key ) {
|
||||
$relation = $query;
|
||||
|
||||
} else if ( ! is_array( $query ) ) {
|
||||
} elseif ( ! is_array( $query ) ) {
|
||||
continue;
|
||||
|
||||
// First-order clause.
|
||||
} else if ( $this->is_first_order_clause( $query ) ) {
|
||||
} elseif ( $this->is_first_order_clause( $query ) ) {
|
||||
if ( isset( $query['value'] ) && array() === $query['value'] ) {
|
||||
unset( $query['value'] );
|
||||
}
|
||||
@@ -1029,7 +1029,7 @@ class WP_Meta_Query {
|
||||
* This value will not actually be used to join clauses, but it
|
||||
* simplifies the logic around combining key-only queries.
|
||||
*/
|
||||
} else if ( 1 === count( $clean_queries ) ) {
|
||||
} elseif ( 1 === count( $clean_queries ) ) {
|
||||
$clean_queries['relation'] = 'OR';
|
||||
|
||||
// Default to AND.
|
||||
@@ -1093,11 +1093,11 @@ class WP_Meta_Query {
|
||||
$primary_meta_query,
|
||||
$existing_meta_query,
|
||||
);
|
||||
} else if ( ! empty( $primary_meta_query ) ) {
|
||||
} elseif ( ! empty( $primary_meta_query ) ) {
|
||||
$meta_query = array(
|
||||
$primary_meta_query,
|
||||
);
|
||||
} else if ( ! empty( $existing_meta_query ) ) {
|
||||
} elseif ( ! empty( $existing_meta_query ) ) {
|
||||
$meta_query = $existing_meta_query;
|
||||
}
|
||||
|
||||
@@ -1254,7 +1254,7 @@ class WP_Meta_Query {
|
||||
foreach ( $query as $key => &$clause ) {
|
||||
if ( 'relation' === $key ) {
|
||||
$relation = $query['relation'];
|
||||
} else if ( is_array( $clause ) ) {
|
||||
} elseif ( is_array( $clause ) ) {
|
||||
|
||||
// This is a first-order clause.
|
||||
if ( $this->is_first_order_clause( $clause ) ) {
|
||||
@@ -1263,7 +1263,7 @@ class WP_Meta_Query {
|
||||
$where_count = count( $clause_sql['where'] );
|
||||
if ( ! $where_count ) {
|
||||
$sql_chunks['where'][] = '';
|
||||
} else if ( 1 === $where_count ) {
|
||||
} elseif ( 1 === $where_count ) {
|
||||
$sql_chunks['where'][] = $clause_sql['where'][0];
|
||||
} else {
|
||||
$sql_chunks['where'][] = '( ' . implode( ' AND ', $clause_sql['where'] ) . ' )';
|
||||
@@ -1492,7 +1492,7 @@ class WP_Meta_Query {
|
||||
$compatible_compares = array( '=', 'IN', 'BETWEEN', 'LIKE', 'REGEXP', 'RLIKE', '>', '>=', '<', '<=' );
|
||||
|
||||
// Clauses joined by AND with "negative" operators share a join only if they also share a key.
|
||||
} else if ( isset( $sibling['key'] ) && isset( $clause['key'] ) && $sibling['key'] === $clause['key'] ) {
|
||||
} elseif ( isset( $sibling['key'] ) && isset( $clause['key'] ) && $sibling['key'] === $clause['key'] ) {
|
||||
$compatible_compares = array( '!=', 'NOT IN', 'NOT LIKE' );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user