Make WordPress Core

Changeset 48162


Ignore:
Timestamp:
06/25/2020 08:54:40 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve DocBlocks in wp-admin/includes/class-wp-list-table.php per the documentation standards.

See #49572.

File:
1 edited

Legend:

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

    r48151 r48162  
    373373
    374374    /**
    375      * Get an associative array ( id => link ) with the list
    376      * of views available on this table.
     375     * Gets the list of views available on this table.
     376     *
     377     * The format is an associative array:
     378     * - `'id' => 'link'`
    377379     *
    378380     * @since 3.1.0
     
    385387
    386388    /**
    387      * Display the list of views available on this table.
     389     * Displays the list of views available on this table.
    388390     *
    389391     * @since 3.1.0
     
    418420
    419421    /**
    420      * Get an associative array ( option_name => option_title ) with the list
    421      * of bulk actions available on this table.
     422     * Gets the list of bulk actions available on this table.
     423     *
     424     * The format is an associative array:
     425     * - `'option_name' => 'option_title'`
    422426     *
    423427     * @since 3.1.0
     
    430434
    431435    /**
    432      * Display the bulk actions dropdown.
     436     * Displays the bulk actions dropdown.
    433437     *
    434438     * @since 3.1.0
     
    440444        if ( is_null( $this->_actions ) ) {
    441445            $this->_actions = $this->get_bulk_actions();
     446
    442447            /**
    443448             * Filters the list table Bulk Actions drop-down.
     
    453458             */
    454459            $this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    455             $two            = '';
     460
     461            $two = '';
    456462        } else {
    457463            $two = '2';
     
    479485
    480486    /**
    481      * Get the current action selected from the bulk actions dropdown.
    482      *
    483      * @since 3.1.0
    484      *
    485      * @return string|false The action name or False if no action was selected
     487     * Gets the current action selected from the bulk actions dropdown.
     488     *
     489     * @since 3.1.0
     490     *
     491     * @return string|false The action name. False if no action was selected.
    486492     */
    487493    public function current_action() {
     
    620626
    621627    /**
    622      * Display a view switcher
     628     * Displays a view switcher.
    623629     *
    624630     * @since 3.1.0
     
    652658
    653659    /**
    654      * Display a comment count bubble
     660     * Displays a comment count bubble.
    655661     *
    656662     * @since 3.1.0
     
    746752
    747753    /**
    748      * Get the current page number
     754     * Gets the current page number.
    749755     *
    750756     * @since 3.1.0
     
    763769
    764770    /**
    765      * Get number of items to display on a single page
     771     * Gets the number of items to display on a single page.
    766772     *
    767773     * @since 3.1.0
     
    794800
    795801    /**
    796      * Display the pagination.
     802     * Displays the pagination.
    797803     *
    798804     * @since 3.1.0
     
    934940
    935941    /**
    936      * Get a list of columns. The format is:
    937      * 'internal-name' => 'Title'
     942     * Gets a list of columns.
     943     *
     944     * The format is:
     945     * - `'internal-name' => 'Title'`
    938946     *
    939947     * @since 3.1.0
     
    947955
    948956    /**
    949      * Get a list of sortable columns.
     957     * Gets a list of sortable columns.
    950958     *
    951959     * The format is:
    952960     * - `'internal-name' => 'orderby'`
    953      * - `'internal-name' => array( 'orderby', 'asc' )` - The second element set the initial sorting order.
    954      * - `'internal-name' => array( 'orderby', true )` - The second element will make the initial sorting order be descending.
     961     * - `'internal-name' => array( 'orderby', 'asc' )` - The second element sets the initial sorting order.
     962     * - `'internal-name' => array( 'orderby', true )`  - The second element makes the initial order descending.
    955963     *
    956964     * @since 3.1.0
     
    10371045
    10381046    /**
    1039      * Get a list of all, hidden and sortable columns, with filter applied
     1047     * Gets a list of all, hidden and sortable columns, with filter applied.
    10401048     *
    10411049     * @since 3.1.0
     
    10931101
    10941102    /**
    1095      * Return number of visible columns
     1103     * Returns the number of visible columns.
    10961104     *
    10971105     * @since 3.1.0
     
    11061114
    11071115    /**
    1108      * Print column headers, accounting for hidden and sortable columns.
     1116     * Prints column headers, accounting for hidden and sortable columns.
    11091117     *
    11101118     * @since 3.1.0
     
    11581166
    11591167                if ( $current_orderby === $orderby ) {
    1160                     $order   = 'asc' === $current_order ? 'desc' : 'asc';
     1168                    $order = 'asc' === $current_order ? 'desc' : 'asc';
     1169
    11611170                    $class[] = 'sorted';
    11621171                    $class[] = $current_order;
     
    11671176                        $order = $desc_first ? 'desc' : 'asc';
    11681177                    }
     1178
    11691179                    $class[] = 'sortable';
    11701180                    $class[] = 'desc' === $order ? 'asc' : 'desc';
     
    12271237
    12281238    /**
    1229      * Get a list of CSS classes for the WP_List_Table table tag.
     1239     * Gets a list of CSS classes for the WP_List_Table table tag.
    12301240     *
    12311241     * @since 3.1.0
     
    12381248
    12391249    /**
    1240      * Generate the table navigation above or below the table
     1250     * Generates the table navigation above or below the table
    12411251     *
    12421252     * @since 3.1.0
     
    12661276
    12671277    /**
    1268      * Extra controls to be displayed between bulk actions and pagination
     1278     * Extra controls to be displayed between bulk actions and pagination.
    12691279     *
    12701280     * @since 3.1.0
     
    12751285
    12761286    /**
    1277      * Generate the tbody element for the list table.
     1287     * Generates the tbody element for the list table.
    12781288     *
    12791289     * @since 3.1.0
     
    12901300
    12911301    /**
    1292      * Generate the table rows
     1302     * Generates the table rows.
    12931303     *
    12941304     * @since 3.1.0
     
    13011311
    13021312    /**
    1303      * Generates content for a single row of the table
     1313     * Generates content for a single row of the table.
    13041314     *
    13051315     * @since 3.1.0
     
    13251335
    13261336    /**
    1327      * Generates the columns for a single row of the table
    1328      *
    1329      * @since 3.1.0
    1330      *
    1331      * @param object $item The current item
     1337     * Generates the columns for a single row of the table.
     1338     *
     1339     * @since 3.1.0
     1340     *
     1341     * @param object $item The current item.
    13321342     */
    13331343    protected function single_row_columns( $item ) {
     
    13921402
    13931403    /**
    1394      * Handle an incoming ajax request (called from admin-ajax.php)
     1404     * Handles an incoming ajax request (called from admin-ajax.php)
    13951405     *
    13961406     * @since 3.1.0
     
    14261436
    14271437    /**
    1428      * Send required variables to JavaScript land
     1438     * Sends required variables to JavaScript land.
     1439     *
     1440     * @since 3.1.0
    14291441     */
    14301442    public function _js_vars() {
Note: See TracChangeset for help on using the changeset viewer.