WordPress.org

Make WordPress Core

Changeset 48693


Ignore:
Timestamp:
07/30/2020 01:25:10 PM (4 days ago)
Author:
SergeyBiryukov
Message:

Comments: Pass the $which parameter to the manage_comments_nav action.

This brings some consistency with the manage_users_extra_tablenav and manage_users_extra_tablenav actions.

Props Tkama, wpgurudev.
Fixes #50736.

File:
1 edited

Legend:

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

    r48670 r48693  
    391391            $has_items = $this->has_items();
    392392        }
     393
    393394        echo '<div class="alignleft actions">';
     395
    394396        if ( 'top' === $which ) {
    395397            ob_start();
     
    416418            submit_button( $title, 'apply', 'delete_all', false );
    417419        }
     420
    418421        /**
    419422         * Fires after the Filter submit button for comment types.
    420423         *
    421424         * @since 2.5.0
     425         * @since 5.6.0 The `$which` parameter was added.
    422426         *
    423427         * @param string $comment_status The comment status name. Default 'All'.
     428         * @param string $which          The location of the extra table nav markup: 'top' or 'bottom'.
    424429         */
    425         do_action( 'manage_comments_nav', $comment_status );
     430        do_action( 'manage_comments_nav', $comment_status, $which );
     431
    426432        echo '</div>';
    427433    }
Note: See TracChangeset for help on using the changeset viewer.