Make WordPress Core

Changeset 61521


Ignore:
Timestamp:
01/23/2026 06:21:35 PM (4 months ago)
Author:
westonruter
Message:

Docs: Add descriptions to docblocks in WP_Comments_List_Table.

Developed in https://github.com/WordPress/wordpress-develop/pull/10569

Follow-up to [32642].

Props huzaifaalmesbah, westonruter, noruzzaman.
See #64224.

File:
1 edited

Legend:

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

    r61464 r61521  
    7171
    7272    /**
    73      * @return bool
     73     * Checks if the user can edit posts.
     74     *
     75     * @return bool Whether the user can edit posts.
    7476     */
    7577    public function ajax_user_can() {
     
    7880
    7981    /**
    80      * @global string $mode           List table view mode.
    81      * @global int    $post_id
    82      * @global string $comment_status
    83      * @global string $comment_type
    84      * @global string $search
     82     * Prepares the comments list items.
     83     *
     84     * @global string $mode           Current list table display mode.
     85     * @global int    $post_id        Current post ID filter.
     86     * @global string $comment_status Comment status filter.
     87     * @global string $comment_type   Comment type filter.
     88     * @global string $search         Search term.
    8589     */
    8690    public function prepare_items() {
     
    199203
    200204    /**
    201      * @param string $comment_status
    202      * @return int
     205     * Gets the number of comments to display per page.
     206     *
     207     * @param string $comment_status Comment status.
     208     * @return int Comments per page.
    203209     */
    204210    public function get_per_page( $comment_status = 'all' ) {
     
    217223
    218224    /**
     225     * Displays a message when no comments are found.
     226     *
    219227     * @global string $comment_status
    220228     */
     
    232240
    233241    /**
    234      * @global int $post_id
     242     * Returns an array of comment status links.
     243     *
     244     * @global int    $post_id
    235245     * @global string $comment_status
    236246     * @global string $comment_type
     247     *
     248     * @return array<string, string> Comment status HTML links keyed by view.
    237249     */
    238250    protected function get_views() {
     
    355367
    356368    /**
    357      * @global string $comment_status
    358      *
    359      * @return array
     369     * Gets the available bulk actions for the comments list.
     370     *
     371     * @global string $comment_status Current comment status filter.
     372     *
     373     * @return array<string, string> Bulk action labels keyed by action name.
    360374     */
    361375    protected function get_bulk_actions() {
     
    396410
    397411    /**
     412     * Displays extra controls between bulk actions and pagination.
     413     *
    398414     * @global string $comment_status
    399415     * @global string $comment_type
    400416     *
    401      * @param string $which
     417     * @param string $which The location of the extra table nav markup: Either 'top' or 'bottom'.
    402418     */
    403419    protected function extra_tablenav( $which ) {
     
    454470
    455471    /**
    456      * @return string|false
     472     * Gets the current action selected from the bulk actions dropdown.
     473     *
     474     * @return string|false Current action or false if none.
    457475     */
    458476    public function current_action() {
     
    465483
    466484    /**
     485     * Gets the list of columns.
     486     *
    467487     * @global int $post_id
    468488     *
     
    548568
    549569    /**
    550      * @return array
     570     * Gets a list of sortable columns.
     571     *
     572     * @return array<string, string|array> The sortable columns.
    551573     */
    552574    protected function get_sortable_columns() {
     
    639661
    640662    /**
     663     * Generates content for a single row of the table.
     664     *
    641665     * @global WP_Post    $post    Global post object.
    642666     * @global WP_Comment $comment Global comment object.
    643667     *
    644      * @param WP_Comment $item
     668     * @param WP_Comment $item The comment object.
    645669     */
    646670    public function single_row( $item ) {
     
    918942
    919943    /**
     944     * Outputs the checkbox column.
     945     *
    920946     * @since 5.9.0 Renamed `$comment` to `$item` to match parent class for PHP 8 named parameter support.
    921947     *
     
    942968
    943969    /**
     970     * Outputs the comment column.
     971     *
    944972     * @param WP_Comment $comment The comment object.
    945973     */
     
    9811009
    9821010    /**
     1011     * Outputs the author column.
     1012     *
    9831013     * @global string $comment_status
    9841014     *
     
    10401070
    10411071    /**
     1072     * Outputs the date column.
     1073     *
    10421074     * @param WP_Comment $comment The comment object.
    10431075     */
     
    10681100
    10691101    /**
     1102     * Outputs the response column.
     1103     *
    10701104     * @param WP_Comment $comment The comment object.
    10711105     */
     
    11141148
    11151149    /**
     1150     * Outputs the default column.
     1151     *
    11161152     * @since 5.9.0 Renamed `$comment` to `$item` to match parent class for PHP 8 named parameter support.
    11171153     *
Note: See TracChangeset for help on using the changeset viewer.