Changeset 5587 for trunk/wp-admin/edit.php
- Timestamp:
- 05/29/2007 04:28:10 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit.php
r5583 r5587 17 17 18 18 $post_status_q = ''; 19 $author_q = '';20 19 $post_status_label = _c('Posts|manage posts header'); 21 $post_listing_pageable = true;22 20 if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) { 23 21 $post_status_label = $post_stati[$_GET['post_status']][1]; 24 $post_listing_pageable = false;25 22 $post_status_q = '&post_status=' . $_GET['post_status']; 26 if ( in_array( $_GET['post_status'], array('draft', 'private') ) )27 $author_q = "&author=$user_ID";28 elseif ( 'publish' == $_GET['post_status'] );29 $post_listing_pageable = true;30 23 } 31 24 ?> … … 35 28 <?php 36 29 37 wp("what_to_show=posts$ author_q$post_status_q&posts_per_page=15&posts_per_archive_page=-1");30 wp("what_to_show=posts$post_status_q&posts_per_page=15"); 38 31 39 32 do_action('restrict_manage_posts'); … … 66 59 $h2_noun = $post_status_label; 67 60 // Use $_GET instead of is_ since they can override each other 61 $h2_author = ''; 62 if ( isset($_GET['author']) && $_GET['author'] ) { 63 $author_user = get_userdata( get_query_var( 'author' ) ); 64 $h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name )); 65 } 68 66 $h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching “%s”'), wp_specialchars( get_search_query() ) ) : ''; 69 67 $h2_cat = isset($_GET['cat']) && $_GET['cat'] ? ' ' . sprintf( __('in “%s”'), single_cat_title('', false) ) : ''; 70 68 $h2_month = isset($_GET['m']) && $_GET['m'] ? ' ' . sprintf( __('during %s'), single_month_title(' ', false) ) : ''; 71 printf( _c( '%1$s%2$s%3$s%4$s |manage posts header' ), $h2_noun, $h2_search, $h2_cat, $h2_month );69 printf( _c( '%1$s%2$s%3$s%4$s%5$s|manage posts header' ), $h2_noun, $h2_author, $h2_search, $h2_cat, $h2_month ); 72 70 } 73 71 ?></h2> … … 87 85 </fieldset> 88 86 87 <?php 88 $editable_ids = get_editable_user_ids( $user_ID ); 89 if ( $editable_ids && count( $editable_ids ) > 1 ) : 90 ?> 91 <fieldset><legend><?php _e('Author…'); ?></legend> 92 <?php wp_dropdown_users( array('include' => $editable_ids, 'show_option_all' => __('Any'), 'name' => 'author', 'selected' => isset($_GET['author']) ? $_GET['author'] : 0) ); ?> 93 </fieldset> 94 89 95 <?php 90 96 endif; 91 97 92 98 $arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'post' ORDER BY post_date DESC"; … … 130 136 <br style="clear:both;" /> 131 137 132 <?php 133 if ( $post_status_q && ( false !== strpos($post_status_q, 'draft') || false !== strpos($post_status_q, 'private') ) ) { 134 echo '<h3>' . __('Your Posts') . "</h3>\n"; 135 include( 'edit-post-rows.php' ); 136 137 $editable_ids = get_editable_user_ids( $user_ID ); 138 139 if ( $editable_ids && count($editable_ids) > 1 ) { 140 $_editable_ids = join(',', array_diff($editable_ids, array($user_ID))); 141 142 $post_status_q = "&post_status=" . $_GET['post_status']; 143 144 unset($GLOBALS['day']); // setup_postdata does this 145 wp("what_to_show=posts&author=$_editable_ids$post_status_q&posts_per_page=-1&posts_per_archive_page=-1"); 146 147 if ( have_posts() ) { 148 echo '<h3>' . __("Others' Posts") . "</h3>\n"; 149 include( 'edit-post-rows.php' ); 150 } 151 } 152 153 } else { 154 include( 'edit-post-rows.php' ); 155 } 156 ?> 138 <?php include( 'edit-post-rows.php' ); ?> 157 139 158 140 <div id="ajax-response"></div>
Note: See TracChangeset
for help on using the changeset viewer.