WordPress.org

Make WordPress Core

Ticket #19711: 19711.patch

File 19711.patch, 2.0 KB (added by chriscct7, 6 years ago)
  • src/wp-admin/edit.php

     
    294294<div class="wrap">
    295295<h1><?php
    296296echo esc_html( $post_type_object->labels->name );
    297 if ( current_user_can( $post_type_object->cap->create_posts ) )
     297if ( current_user_can( $post_type_object->cap->create_posts ) ) {
    298298        echo ' <a href="' . esc_url( admin_url( $post_new_file ) ) . '" class="page-title-action">' . esc_html( $post_type_object->labels->add_new ) . '</a>';
    299 if ( ! empty( $_REQUEST['s'] ) )
     299}
     300if ( ! empty( $_REQUEST['s'] ) ) {
    300301        printf( ' <span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', get_search_query() );
     302}
     303if ( !empty( $_REQUEST['m'] ) || !empty( $_REQUEST['cat']) || !empty( $_REQUEST['author'] ) ) {
     304    $post_filters = array();
     305    if ( !empty( $_REQUEST['cat'] )  ) {
     306        $post_filters[] = single_cat_title( '', false );
     307    }
     308    if ( !empty( $_REQUEST['author'] ) ) {
     309        $post_filters[] = get_user_meta( $_REQUEST['author'], 'nickname', true );
     310    }
     311    if ( !empty( $_REQUEST['m'] ) ) {
     312        /* translators: 1: month name, 2: 4-digit year */
     313        $post_filters[] = sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( substr( $_REQUEST['m'], 4, 2 ) ), substr( $_REQUEST['m'], 0, 4 ) );
     314    }
     315    printf( ' <span class="subtitle">' . __('Showing posts from: %s') . '</span>', implode(', ', $post_filters ) );
     316}
    301317?></h1>
    302318
    303319<?php
  • src/wp-admin/includes/class-wp-posts-list-table.php

     
    453453                                wp_dropdown_categories( $dropdown_options );
    454454                        }
    455455
     456                        $this->authors_dropdown( $this->screen->post_type );
     457
    456458                        /**
    457459                         * Fires before the Filter button on the Posts and Pages list tables.
    458460                         *