Make WordPress Core

Changeset 26401


Ignore:
Timestamp:
11/26/2013 08:11:33 AM (13 years ago)
Author:
DrewAPicture
Message:

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

Props miyauchi, kpdesign.
Fixes 25848.

File:
1 edited

Legend:

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

    r25592 r26401  
    245245        function views() {
    246246                $views = $this->get_views();
    247                 $views = apply_filters( 'views_' . $this->screen->id, $views );
     247                /**
     248                 * Filter the list of available list table views.
     249                 *
     250                 * The dynamic portion of the hook name, $this->screen->id, refers
     251                 * to the ID of the current screen, usually a string.
     252                 *
     253                 * @since 3.5.0
     254                 *
     255                 * @param array $views An array of available list table views.
     256                 */
     257                $views = apply_filters( "views_{$this->screen->id}", $views );
    248258
    249259                if ( empty( $views ) )
    … …  
    280290                if ( is_null( $this->_actions ) ) {
    281291                        $no_new_actions = $this->_actions = $this->get_bulk_actions();
    282                         // This filter can currently only be used to remove actions.
    283                         $this->_actions = apply_filters( 'bulk_actions-' . $this->screen->id, $this->_actions );
     292                        /**
     293                         * Filter the list table Bulk Actions drop-down.
     294                         *
     295                         * The dynamic portion of the hook name, $this->screen->id, refers
     296                         * to the ID of the current screen, usually a string.
     297                         *
     298                         * This filter can currently only be used to remove bulk actions.
     299                         *
     300                         * @since 3.5.0
     301                         *
     302                         * @param array $actions An array of the available bulk actions.
     303                         */
     304                        $this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions );
    284305                        $this->_actions = array_intersect_assoc( $this->_actions, $no_new_actions );
    285306                        $two = '';
    … …  
    369390
    370391                /**
    371                  * Filter the months dropdown results.
     392                 * Filter the 'Months' drop-down results.
    372393                 *
    373394                 * @since 3.7.0
    374395                 *
    375                  * @param object $months    The months dropdown query results.
     396                 * @param object $months    The months drop-down query results.
    376397                 * @param string $post_type The post type.
    377398                 */
    … …  
    483504                        $per_page = $default;
    484505
     506                /**
     507                 * Filter the number of items to be displayed on each page of the list table.
     508                 *
     509                 * The dynamic hook name, $option, refers to the per page option depending
     510                 * on the type of list table in use. Possible values may include:
     511                 * 'edit_comments_per_page', 'sites_network_per_page', 'site_themes_network_per_page',
     512                 * 'themes_netework_per_page', 'users_network_per_page', 'edit_{$post_type}', etc.
     513                 *
     514                 * @since 2.9.0
     515                 *
     516                 * @param int $per_page Number of items to be displayed. Default 20.
     517                 */
    485518                return (int) apply_filters( $option, $per_page );
    486519        }
    … …  
    615648                $hidden = get_hidden_columns( $this->screen );
    616649
    617                 $_sortable = apply_filters( "manage_{$this->screen->id}_sortable_columns", $this->get_sortable_columns() );
     650                $sortable_columns = $this->get_sortable_columns();
     651                /**
     652                 * Filter the list table sortable columns for a specific screen.
     653                 *
     654                 * The dynamic portion of the hook name, $this->screen->id, refers
     655                 * to the ID of the current screen, usually a string.
     656                 *
     657                 * @since 3.5.0
     658                 *
     659                 * @param array $sortable_columns An array of sortable columns.
     660                 */
     661                $_sortable = apply_filters( "manage_{$this->screen->id}_sortable_columns", $sortable_columns );
    618662
    619663                $sortable = array();
Note: See TracChangeset for help on using the changeset viewer.