Ticket #30254: 30254.6.patch
File 30254.6.patch, 855 bytes (added by , 10 years ago) |
---|
-
src/wp-admin/includes/class-wp-list-table.php
509 509 protected function months_dropdown( $post_type ) { 510 510 global $wpdb, $wp_locale; 511 511 512 /** 513 * Filter whether to remove the 'Months' drop-down from the post list table. 514 * 515 * @since 4.2.0 516 * 517 * @param bool $disable Whether to disable the drop-down. Default false. 518 * @param string $post_type The post type. 519 */ 520 if ( apply_filters( 'disable_months_dropdown', false, $post_type ) ) { 521 return; 522 } 523 512 524 $months = $wpdb->get_results( $wpdb->prepare( " 513 525 SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month 514 526 FROM $wpdb->posts