Changeset 49975
- Timestamp:
- 01/18/2021 09:48:23 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-media-list-table.php
r49720 r49975 197 197 ?> 198 198 <div class="actions"> 199 <?php200 if ( ! $this->is_trash ) {201 $this->months_dropdown( 'attachment' );202 }203 204 /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */205 do_action( 'restrict_manage_posts', $this->screen->post_type, $which );206 207 submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );208 209 if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_items() ) {210 submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );211 }212 ?>199 <?php 200 if ( ! $this->is_trash ) { 201 $this->months_dropdown( 'attachment' ); 202 } 203 204 /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */ 205 do_action( 'restrict_manage_posts', $this->screen->post_type, $which ); 206 207 submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); 208 209 if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_items() ) { 210 submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); 211 } 212 ?> 213 213 </div> 214 214 <?php … … 263 263 $this->screen->render_screen_reader_content( 'heading_views' ); 264 264 ?> 265 <div class="wp-filter"> 266 <div class="filter-items"> 267 <?php $this->view_switcher( $mode ); ?> 268 269 <label for="attachment-filter" class="screen-reader-text"><?php _e( 'Filter by type' ); ?></label> 270 <select class="attachment-filters" name="attachment-filter" id="attachment-filter"> 271 <?php 272 if ( ! empty( $views ) ) { 273 foreach ( $views as $class => $view ) { 274 echo "\t$view\n"; 265 <div class="wp-filter"> 266 <div class="filter-items"> 267 <?php $this->view_switcher( $mode ); ?> 268 269 <label for="attachment-filter" class="screen-reader-text"><?php _e( 'Filter by type' ); ?></label> 270 <select class="attachment-filters" name="attachment-filter" id="attachment-filter"> 271 <?php 272 if ( ! empty( $views ) ) { 273 foreach ( $views as $class => $view ) { 274 echo "\t$view\n"; 275 } 276 } 277 ?> 278 </select> 279 280 <?php 281 $this->extra_tablenav( 'bar' ); 282 283 /** This filter is documented in wp-admin/inclues/class-wp-list-table.php */ 284 $views = apply_filters( "views_{$this->screen->id}", array() ); 285 286 // Back compat for pre-4.0 view links. 287 if ( ! empty( $views ) ) { 288 echo '<ul class="filter-links">'; 289 foreach ( $views as $class => $view ) { 290 echo "<li class='$class'>$view</li>"; 291 } 292 echo '</ul>'; 275 293 } 276 } 277 ?> 278 </select> 279 280 <?php 281 $this->extra_tablenav( 'bar' ); 282 283 /** This filter is documented in wp-admin/inclues/class-wp-list-table.php */ 284 $views = apply_filters( "views_{$this->screen->id}", array() ); 285 286 // Back compat for pre-4.0 view links. 287 if ( ! empty( $views ) ) { 288 echo '<ul class="filter-links">'; 289 foreach ( $views as $class => $view ) { 290 echo "<li class='$class'>$view</li>"; 291 } 292 echo '</ul>'; 293 } 294 ?> 295 </div> 296 297 <div class="search-form"> 298 <label for="media-search-input" class="media-search-input-label"><?php esc_html_e( 'Search' ); ?></label> 299 <input type="search" id="media-search-input" class="search" name="s" value="<?php _admin_search_query(); ?>"></div> 300 </div> 294 ?> 295 </div> 296 297 <div class="search-form"> 298 <label for="media-search-input" class="media-search-input-label"><?php esc_html_e( 'Search' ); ?></label> 299 <input type="search" id="media-search-input" class="search" name="s" value="<?php _admin_search_query(); ?>"> 300 </div> 301 </div> 301 302 <?php 302 303 } … … 513 514 514 515 if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $post->post_parent ) ) { 515 ?> 516 <strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"> 517 <?php echo $title; ?></a></strong> 518 <?php 516 printf( '<strong><a href="%s">%s</a></strong>', get_edit_post_link( $post->post_parent ), $title ); 519 517 } elseif ( $parent_type && current_user_can( 'read_post', $post->post_parent ) ) { 520 ?> 521 <strong><?php echo $title; ?></strong> 522 <?php 518 printf( '<strong>%s</strong>', $title ); 523 519 } else { 524 520 _e( '(Private post)' ); … … 651 647 while ( have_posts() ) : 652 648 the_post(); 653 if ( 654 ( $this->is_trash && 'trash' !== $post->post_status ) 655 || ( ! $this->is_trash && 'trash' === $post->post_status ) 649 if ( $this->is_trash && 'trash' !== $post->post_status 650 || ! $this->is_trash && 'trash' === $post->post_status 656 651 ) { 657 652 continue;
Note: See TracChangeset
for help on using the changeset viewer.