Make WordPress Core


Ignore:
Timestamp:
01/08/2014 03:52:47 AM (11 years ago)
Author:
DrewAPicture
Message:

Inline documentation for hooks in wp-admin/includes/class-wp-media-list-table.php.

Props theorboman for the initial patch. Props kpdesign.
Fixes #25839.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r25880 r26916  
    9191            $this->months_dropdown( 'attachment' );
    9292
     93            /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
    9394            do_action( 'restrict_manage_posts' );
    9495            submit_button( __( 'Filter' ), 'button', false, false, array( 'id' => 'post-query-submit' ) );
     
    138139        $taxonomies = wp_filter_object_list( $taxonomies, array( 'show_admin_column' => true ), 'and', 'name' );
    139140
     141        /**
     142         * Filter the taxonomy columns for attachments in the Media list table.
     143         *
     144         * @since 3.5.0
     145         *
     146         * @param array  $taxonomies An array of registered taxonomies to show for attachments.
     147         * @param string $post_type  The post type. Default 'attachment'.
     148         */
    140149        $taxonomies = apply_filters( 'manage_taxonomies_for_attachment_columns', $taxonomies, 'attachment' );
    141150        $taxonomies = array_filter( $taxonomies, 'taxonomy_exists' );
     
    160169        /* translators: column name */
    161170        $posts_columns['date'] = _x( 'Date', 'column name' );
     171        /**
     172         * Filter the Media list table columns.
     173         *
     174         * @since 2.5.0
     175         *
     176         * @param array $posts_columns An array of columns displayed in the Media list table.
     177         * @param bool  $detached      Whether the list table contains media not attached
     178         *                             to any posts. Default true.
     179         */
    162180        $posts_columns = apply_filters( 'manage_media_columns', $posts_columns, $this->detached );
    163181
     
    384402?>
    385403        <td <?php echo $attributes ?>>
     404            <?php
     405                /**
     406                 * Fires for each custom column in the Media list table.
     407                 *
     408                 * Custom columns are registered using the 'manage_media_columns' filter.
     409                 *
     410                 * @since 2.5.0
     411                 *
     412                 * @param string $column_name Name of the custom column.
     413                 * @param int    $post_id     Attachment ID.
     414                 */
     415            ?>
    386416            <?php do_action( 'manage_media_custom_column', $column_name, $post->ID ); ?>
    387417        </td>
     
    431461        }
    432462
     463        /**
     464         * Filter the action links for each attachment in the Media list table.
     465         *
     466         * @since 2.8.0
     467         *
     468         * @param array   $actions  An array of action links for each attachment.
     469         *                          Default 'Edit', 'Delete Permanently', 'View'.
     470         * @param WP_Post $post     WP_Post object for the current attachment.
     471         * @param bool    $detached Whether the list table contains media not attached
     472         *                          to any posts. Default true.
     473         */
    433474        $actions = apply_filters( 'media_row_actions', $actions, $post, $this->detached );
    434475
Note: See TracChangeset for help on using the changeset viewer.