diff --git a/src/wp-admin/includes/class-wp-media-list-table.php b/src/wp-admin/includes/class-wp-media-list-table.php
index fdc26de6ea..95a0feda01 100644
|
a
|
b
|
class WP_Media_List_Table extends WP_List_Table { |
| 196 | 196 | } |
| 197 | 197 | ?> |
| 198 | 198 | <div class="actions"> |
| 199 | | <?php |
| 200 | | if ( ! $this->is_trash ) { |
| 201 | | $this->months_dropdown( 'attachment' ); |
| 202 | | } |
| | 199 | <?php |
| | 200 | if ( ! $this->is_trash ) { |
| | 201 | $this->months_dropdown( 'attachment' ); |
| | 202 | } |
| 203 | 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 ); |
| | 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 | 206 | |
| 207 | | submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); |
| | 207 | submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); |
| 208 | 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 | | ?> |
| | 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 |
| 215 | 215 | } |
| … |
… |
class WP_Media_List_Table extends WP_List_Table { |
| 262 | 262 | |
| 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 ); ?> |
| | 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> |
| 268 | 279 | |
| 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"; |
| | 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> |
| | 294 | ?> |
| | 295 | </div> |
| 296 | 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> |
| | 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 | } |
| 303 | 304 | |
| … |
… |
class WP_Media_List_Table extends WP_List_Table { |
| 421 | 422 | <strong<?php echo $class; ?>> |
| 422 | 423 | <?php |
| 423 | 424 | echo $link_start; |
| 424 | | if ( $thumb ) : |
| | 425 | if ( $thumb ) : |
| 425 | 426 | ?> |
| 426 | 427 | <span class="media-icon <?php echo sanitize_html_class( $mime . '-icon' ); ?>"><?php echo $thumb; ?></span> |
| 427 | 428 | <?php |
| … |
… |
class WP_Media_List_Table extends WP_List_Table { |
| 433 | 434 | <p class="filename"> |
| 434 | 435 | <span class="screen-reader-text"><?php _e( 'File name:' ); ?> </span> |
| 435 | 436 | <?php |
| 436 | | $file = get_attached_file( $post->ID ); |
| 437 | | echo esc_html( wp_basename( $file ) ); |
| | 437 | $file = get_attached_file( $post->ID ); |
| | 438 | echo esc_html( wp_basename( $file ) ); |
| 438 | 439 | ?> |
| 439 | 440 | </p> |
| 440 | 441 | <?php |
| … |
… |
class WP_Media_List_Table extends WP_List_Table { |
| 513 | 514 | |
| 514 | 515 | if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $post->post_parent ) ) { |
| 515 | 516 | ?> |
| 516 | | <strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"> |
| 517 | | <?php echo $title; ?></a></strong> |
| 518 | | <?php |
| | 517 | <strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"><?php echo $title; ?></a></strong> |
| | 518 | <?php |
| 519 | 519 | } elseif ( $parent_type && current_user_can( 'read_post', $post->post_parent ) ) { |
| 520 | 520 | ?> |
| 521 | 521 | <strong><?php echo $title; ?></strong> |
| 522 | | <?php |
| | 522 | <?php |
| 523 | 523 | } else { |
| 524 | 524 | _e( '(Private post)' ); |
| 525 | 525 | } |
| … |
… |
class WP_Media_List_Table extends WP_List_Table { |
| 650 | 650 | |
| 651 | 651 | while ( have_posts() ) : |
| 652 | 652 | the_post(); |
| 653 | | if ( |
| 654 | | ( $this->is_trash && 'trash' !== $post->post_status ) |
| 655 | | || ( ! $this->is_trash && 'trash' === $post->post_status ) |
| 656 | | ) { |
| | 653 | if ( ( $this->is_trash && 'trash' !== $post->post_status ) || ( ! $this->is_trash && 'trash' === $post->post_status ) ) { |
| 657 | 654 | continue; |
| 658 | 655 | } |
| 659 | 656 | $post_owner = ( get_current_user_id() == $post->post_author ) ? 'self' : 'other'; |