Make WordPress Core

Ticket #30254: 30254.6.patch

File 30254.6.patch, 855 bytes (added by SergeyBiryukov, 10 years ago)
  • src/wp-admin/includes/class-wp-list-table.php

     
    509509        protected function months_dropdown( $post_type ) {
    510510                global $wpdb, $wp_locale;
    511511
     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
    512524                $months = $wpdb->get_results( $wpdb->prepare( "
    513525                        SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
    514526                        FROM $wpdb->posts