Changeset 31090 for trunk/src/wp-includes/date.php
- Timestamp:
- 01/08/2015 07:04:40 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/date.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/date.php
r31057 r31090 426 426 } 427 427 428 } else if ( $day_exists && $month_exists ) {428 } elseif ( $day_exists && $month_exists ) { 429 429 /* 430 430 * 2. checking day, month combination … … 608 608 if ( 'relation' === $key ) { 609 609 $relation = $query['relation']; 610 } else if ( is_array( $clause ) ) {610 } elseif ( is_array( $clause ) ) { 611 611 612 612 // This is a first-order clause. … … 617 617 if ( ! $where_count ) { 618 618 $sql_chunks['where'][] = ''; 619 } else if ( 1 === $where_count ) {619 } elseif ( 1 === $where_count ) { 620 620 $sql_chunks['where'][] = $clause_sql['where'][0]; 621 621 } else { … … 726 726 $where_parts[] = "YEAR( $column ) $compare $value"; 727 727 728 if ( isset( $query['month'] ) && $value = $this->build_value( $compare, $query['month'] ) ) 728 if ( isset( $query['month'] ) && $value = $this->build_value( $compare, $query['month'] ) ) { 729 729 $where_parts[] = "MONTH( $column ) $compare $value"; 730 else if ( isset( $query['monthnum'] ) && $value = $this->build_value( $compare, $query['monthnum'] ) )730 } elseif ( isset( $query['monthnum'] ) && $value = $this->build_value( $compare, $query['monthnum'] ) ) { 731 731 $where_parts[] = "MONTH( $column ) $compare $value"; 732 733 if ( isset( $query['week'] ) && false !== ( $value = $this->build_value( $compare, $query['week'] ) ) ) 732 } 733 if ( isset( $query['week'] ) && false !== ( $value = $this->build_value( $compare, $query['week'] ) ) ) { 734 734 $where_parts[] = _wp_mysql_week( $column ) . " $compare $value"; 735 else if ( isset( $query['w'] ) && false !== ( $value = $this->build_value( $compare, $query['w'] ) ) )735 } elseif ( isset( $query['w'] ) && false !== ( $value = $this->build_value( $compare, $query['w'] ) ) ) { 736 736 $where_parts[] = _wp_mysql_week( $column ) . " $compare $value"; 737 737 } 738 738 if ( isset( $query['dayofyear'] ) && $value = $this->build_value( $compare, $query['dayofyear'] ) ) 739 739 $where_parts[] = "DAYOFYEAR( $column ) $compare $value"; … … 859 859 ); 860 860 861 } else if ( preg_match( '/^(\d{4})\-(\d{2})$/', $datetime, $matches ) ) {861 } elseif ( preg_match( '/^(\d{4})\-(\d{2})$/', $datetime, $matches ) ) { 862 862 // Y-m 863 863 $datetime = array( … … 866 866 ); 867 867 868 } else if ( preg_match( '/^(\d{4})\-(\d{2})\-(\d{2})$/', $datetime, $matches ) ) {868 } elseif ( preg_match( '/^(\d{4})\-(\d{2})\-(\d{2})$/', $datetime, $matches ) ) { 869 869 // Y-m-d 870 870 $datetime = array( … … 874 874 ); 875 875 876 } else if ( preg_match( '/^(\d{4})\-(\d{2})\-(\d{2}) (\d{2}):(\d{2})$/', $datetime, $matches ) ) {876 } elseif ( preg_match( '/^(\d{4})\-(\d{2})\-(\d{2}) (\d{2}):(\d{2})$/', $datetime, $matches ) ) { 877 877 // Y-m-d H:i 878 878 $datetime = array(
Note: See TracChangeset
for help on using the changeset viewer.