- Timestamp:
- 08/17/2018 01:50:26 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-media-list-table.php
r43063 r43571 172 172 return; 173 173 } 174 ?>174 ?> 175 175 <div class="actions"> 176 <?php177 if ( ! is_singular() ) {178 if ( ! $this->is_trash ) {179 $this->months_dropdown( 'attachment' );180 }181 182 /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */183 do_action( 'restrict_manage_posts', $this->screen->post_type, $which );184 185 submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );186 }187 188 if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_items() ) {189 submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );190 }176 <?php 177 if ( ! is_singular() ) { 178 if ( ! $this->is_trash ) { 179 $this->months_dropdown( 'attachment' ); 180 } 181 182 /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */ 183 do_action( 'restrict_manage_posts', $this->screen->post_type, $which ); 184 185 submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); 186 } 187 188 if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_items() ) { 189 submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); 190 } 191 191 ?> 192 192 </div> 193 <?php193 <?php 194 194 } 195 195 … … 237 237 238 238 $this->screen->render_screen_reader_content( 'heading_views' ); 239 ?>239 ?> 240 240 <div class="wp-filter"> 241 241 <div class="filter-items"> … … 253 253 </select> 254 254 255 <?php255 <?php 256 256 $this->extra_tablenav( 'bar' ); 257 257 … … 260 260 261 261 // Back compat for pre-4.0 view links. 262 if ( ! empty( $views ) ) {263 echo '<ul class="filter-links">';264 foreach ( $views as $class => $view ) {265 echo "<li class='$class'>$view</li>";266 }267 echo '</ul>';268 }269 ?>262 if ( ! empty( $views ) ) { 263 echo '<ul class="filter-links">'; 264 foreach ( $views as $class => $view ) { 265 echo "<li class='$class'>$view</li>"; 266 } 267 echo '</ul>'; 268 } 269 ?> 270 270 </div> 271 271 … … 274 274 <input type="search" placeholder="<?php esc_attr_e( 'Search media items...' ); ?>" id="media-search-input" class="search" name="s" value="<?php _admin_search_query(); ?>"></div> 275 275 </div> 276 <?php276 <?php 277 277 } 278 278 … … 355 355 public function column_cb( $post ) { 356 356 if ( current_user_can( 'edit_post', $post->ID ) ) { 357 ?>357 ?> 358 358 <label class="screen-reader-text" for="cb-select-<?php echo $post->ID; ?>"> 359 359 <?php 360 360 echo sprintf( __( 'Select %s' ), _draft_or_post_title() ); 361 ?>361 ?> 362 362 </label> 363 363 <input type="checkbox" name="media[]" id="cb-select-<?php echo $post->ID; ?>" value="<?php echo $post->ID; ?>" /> 364 <?php364 <?php 365 365 } 366 366 } … … 396 396 echo $link_start; 397 397 if ( $thumb ) : 398 ?>398 ?> 399 399 <span class="media-icon <?php echo sanitize_html_class( $mime . '-icon' ); ?>"><?php echo $thumb; ?></span> 400 <?php400 <?php 401 401 endif; 402 402 echo $title . $link_end; … … 488 488 489 489 if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $post->post_parent ) ) { 490 ?>490 ?> 491 491 <strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"> 492 492 <?php echo $title; ?></a></strong> 493 493 <?php 494 494 } elseif ( $parent_type && current_user_can( 'read_post', $post->post_parent ) ) { 495 ?>495 ?> 496 496 <strong><?php echo $title; ?></strong> 497 497 <?php … … 506 506 'media[]' => $post->ID, 507 507 '_wpnonce' => wp_create_nonce( 'bulk-' . $this->_args['plural'] ), 508 ), 'upload.php' 508 ), 509 'upload.php' 509 510 ); 510 511 printf( … … 632 633 } 633 634 $post_owner = ( get_current_user_id() == $post->post_author ) ? 'self' : 'other'; 634 ?>635 ?> 635 636 <tr id="post-<?php echo $post->ID; ?>" class="<?php echo trim( ' author-' . $post_owner . ' status-' . $post->post_status ); ?>"> 636 637 <?php $this->single_row_columns( $post ); ?> 637 638 </tr> 638 <?php639 <?php 639 640 endwhile; 640 641 }
Note: See TracChangeset
for help on using the changeset viewer.