comment_status_links
Filters the comment status links.
Usage
add_filter( 'comment_status_links', 'wp_kama_comment_status_links_filter' ); /** * Function for `comment_status_links` filter-hook. * * @param string[] $status_links An associative array of fully-formed comment status links. Includes 'All', 'Mine', 'Pending', 'Approved', 'Spam', and 'Trash'. * * @return string[] */ function wp_kama_comment_status_links_filter( $status_links ){ // filter... return $status_links; }
- $status_links(string[])
- An associative array of fully-formed comment status links. Includes 'All', 'Mine', 'Pending', 'Approved', 'Spam', and 'Trash'.
Changelog
Since 2.5.0 | Introduced. |
Since 5.1.0 | The 'Mine' link was added. |
Where the hook is called
comment_status_links
wp-admin/includes/class-wp-comments-list-table.php 349
return apply_filters( 'comment_status_links', $this->get_views_links( $status_links ) );