Changeset 43571 for trunk/src/wp-includes/query.php
- Timestamp:
- 08/17/2018 01:50:26 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/query.php
r42843 r43571 1038 1038 // just in case there are multiple identical _wp_old_slug values 1039 1039 if ( get_query_var( 'year' ) ) { 1040 $query .= $wpdb->prepare( " AND YEAR(post_date) = %d", get_query_var( 'year' ) );1040 $query .= $wpdb->prepare( ' AND YEAR(post_date) = %d', get_query_var( 'year' ) ); 1041 1041 } 1042 1042 if ( get_query_var( 'monthnum' ) ) { 1043 $query .= $wpdb->prepare( " AND MONTH(post_date) = %d", get_query_var( 'monthnum' ) );1043 $query .= $wpdb->prepare( ' AND MONTH(post_date) = %d', get_query_var( 'monthnum' ) ); 1044 1044 } 1045 1045 if ( get_query_var( 'day' ) ) { 1046 $query .= $wpdb->prepare( " AND DAYOFMONTH(post_date) = %d", get_query_var( 'day' ) );1046 $query .= $wpdb->prepare( ' AND DAYOFMONTH(post_date) = %d', get_query_var( 'day' ) ); 1047 1047 } 1048 1048 … … 1070 1070 $date_query = ''; 1071 1071 if ( get_query_var( 'year' ) ) { 1072 $date_query .= $wpdb->prepare( " AND YEAR(pm_date.meta_value) = %d", get_query_var( 'year' ) );1072 $date_query .= $wpdb->prepare( ' AND YEAR(pm_date.meta_value) = %d', get_query_var( 'year' ) ); 1073 1073 } 1074 1074 if ( get_query_var( 'monthnum' ) ) { 1075 $date_query .= $wpdb->prepare( " AND MONTH(pm_date.meta_value) = %d", get_query_var( 'monthnum' ) );1075 $date_query .= $wpdb->prepare( ' AND MONTH(pm_date.meta_value) = %d', get_query_var( 'monthnum' ) ); 1076 1076 } 1077 1077 if ( get_query_var( 'day' ) ) { 1078 $date_query .= $wpdb->prepare( " AND DAYOFMONTH(pm_date.meta_value) = %d", get_query_var( 'day' ) );1078 $date_query .= $wpdb->prepare( ' AND DAYOFMONTH(pm_date.meta_value) = %d', get_query_var( 'day' ) ); 1079 1079 } 1080 1080
Note: See TracChangeset
for help on using the changeset viewer.