Ticket #25839: 25839.2.patch
| File 25839.2.patch, 2.9 KB (added by , 12 years ago) |
|---|
-
src/wp-admin/includes/class-wp-media-list-table.php
90 90 if ( 'top' == $which && !is_singular() && !$this->detached && !$this->is_trash ) { 91 91 $this->months_dropdown( 'attachment' ); 92 92 93 /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */ 93 94 do_action( 'restrict_manage_posts' ); 95 94 96 submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) ); 95 97 } 96 98 … … 137 139 $taxonomies = get_taxonomies_for_attachments( 'objects' ); 138 140 $taxonomies = wp_filter_object_list( $taxonomies, array( 'show_admin_column' => true ), 'and', 'name' ); 139 141 142 /** 143 * Filter taxonomy columns for attachments. 144 * 145 * @since 3.5.0 146 * 147 * @param array $taxonomies Array of registered taxonomies to show for attachments. 148 * @param string $post_type Post type. Default 'attachment'. 149 */ 140 150 $taxonomies = apply_filters( 'manage_taxonomies_for_attachment_columns', $taxonomies, 'attachment' ); 141 151 $taxonomies = array_filter( $taxonomies, 'taxonomy_exists' ); 142 152 … … 159 169 } 160 170 /* translators: column name */ 161 171 $posts_columns['date'] = _x( 'Date', 'column name' ); 172 173 /** 174 * Filter media list table columns. 175 * 176 * @since 2.5.0 177 * 178 * @param array $posts_columns Array of columns displayed in the media list table. 179 * @param bool $detached Whether or not the list table contains media is filtered 180 * to display media not attached to any posts. Default true. 181 */ 162 182 $posts_columns = apply_filters( 'manage_media_columns', $posts_columns, $this->detached ); 163 183 164 184 return $posts_columns; … … 383 403 } 384 404 ?> 385 405 <td <?php echo $attributes ?>> 406 <?php 407 /** 408 * Fires for each custom column in the media list table. 409 * 410 * Custom columns are registered using the 'manage_media_columns' filter. 411 * 412 * @since 2.5.0 413 * 414 * @param string $column_name Name of the custom column. 415 * @param int $post_id Attachment ID. 416 */ 417 ?> 386 418 <?php do_action( 'manage_media_custom_column', $column_name, $post->ID ); ?> 387 419 </td> 388 420 <?php … … 430 462 } 431 463 } 432 464 465 /** 466 * Filter row action links for each attachment in the media list table. 467 * 468 * @since 2.8.0 469 * 470 * @param array $actions Array of actions for each attachment in the list table. 471 * @param WP_Post $post WP_Post object for the current attachment. 472 * @param bool $detached Whether or not the list table contains media is filtered 473 * to display media not attached to any posts. Default true. 474 */ 433 475 $actions = apply_filters( 'media_row_actions', $actions, $post, $this->detached ); 434 476 435 477 return $actions;