Make WordPress Core


Ignore:
Timestamp:
05/29/2007 04:28:10 AM (18 years ago)
Author:
ryan
Message:

Post and page management filter additions from mdawaffe. see #3945

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-pages.php

    r5583 r5587  
    1414
    1515$post_status_label = _c('Pages|manage pages header');
    16 $post_listing_pageable = true;
    1716$post_status_q = '';
    1817if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) {
    1918    $post_status_label = $post_stati[$_GET['post_status']][1];
    20     $post_listing_pageable = false;
    2119    $post_status_q = '&post_status=' . $_GET['post_status'];
    22     if ( 'publish' == $_GET['post_status'] );
    23         $post_listing_pageable = true;
    2420}
    2521
     
    3127// Use $_GET instead of is_ since they can override each other
    3228$h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching “%s”'), wp_specialchars( stripslashes( $_GET['s'] ) ) ) : '';
    33 printf( _c( '%1$s%2$s|manage pages header' ), $post_status_label, $h2_search );
     29$h2_author = '';
     30if ( isset($_GET['author']) && $_GET['author'] ) {
     31    $author_user = get_userdata( (int) $_GET['author'] );
     32    $h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name ));
     33}
     34printf( _c( '%1$s%2$s%3$s|manage pages header' ), $post_status_label, $h2_author, $h2_search );
    3435?></h2>
    3536
     
    5051        </select>
    5152    </fieldset>
     53
     54<?php $editable_ids = get_editable_user_ids( $user_ID ); if ( $editable_ids && count( $editable_ids ) > 1 ) : ?>
     55
     56    <fieldset><legend><?php _e('Author&hellip;'); ?></legend>
     57        <?php wp_dropdown_users( array('include' => $editable_ids, 'show_option_all' => __('Any'), 'name' => 'author', 'selected' => isset($_GET['author']) ? $_GET['author'] : 0) ); ?>
     58    </fieldset>
     59
     60<?php endif; ?>
    5261
    5362    <input type="submit" id="post-query-submit" value="<?php _e('Filter &#187;'); ?>" class="button" />
Note: See TracChangeset for help on using the changeset viewer.