Changeset 28935 for trunk/src/wp-includes/date.php
- Timestamp:
- 07/01/2014 01:17:39 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/date.php
r28532 r28935 48 48 /** 49 49 * Constructor. 50 * 51 * @since 3.7.0 52 * @since 4.0.0 The $inclusive logic was updated to include all times within the date range. 50 53 * 51 54 * @param array $date_query { … … 236 239 $compare = $this->get_compare( $query ); 237 240 241 $inclusive = ! empty( $query['inclusive'] ); 242 243 // Assign greater- and less-than values. 238 244 $lt = '<'; 239 245 $gt = '>'; 240 if ( ! empty( $query['inclusive'] ) ) { 246 247 if ( $inclusive ) { 241 248 $lt .= '='; 242 249 $gt .= '='; … … 245 252 // Range queries 246 253 if ( ! empty( $query['after'] ) ) 247 $where_parts[] = $wpdb->prepare( "$column $gt %s", $this->build_mysql_datetime( $query['after'], true ) );254 $where_parts[] = $wpdb->prepare( "$column $gt %s", $this->build_mysql_datetime( $query['after'], ! $inclusive ) ); 248 255 249 256 if ( ! empty( $query['before'] ) ) 250 $where_parts[] = $wpdb->prepare( "$column $lt %s", $this->build_mysql_datetime( $query['before'], false ) );257 $where_parts[] = $wpdb->prepare( "$column $lt %s", $this->build_mysql_datetime( $query['before'], $inclusive ) ); 251 258 252 259 // Specific value queries
Note: See TracChangeset
for help on using the changeset viewer.