Filter hook 'comment_status_links'

in WP Core File wp-admin/includes/class-wp-comments-list-table.php at line 349

View Source

comment_status_links

Filter Hook
Description
Filters the comment status links.

Hook Information

File Location wp-admin/includes/class-wp-comments-list-table.php View on GitHub
Hook Type Filter
Line Number 349

Hook Parameters

Type Name Description
string[] $status_links An associative array of fully-formed comment status links. Includes 'All', 'Mine', 'Pending', 'Approved', 'Spam', and 'Trash'.

Usage Examples

Basic Usage
<?php
// Hook into comment_status_links
add_filter('comment_status_links', 'my_custom_filter', 10, 1);

function my_custom_filter($status_links) {
    // Your custom filtering logic here
    return $status_links;
}

Source Code Context

wp-admin/includes/class-wp-comments-list-table.php:349 - How this hook is used in WordPress core
<?php
 344  		 * @since 5.1.0 The 'Mine' link was added.
 345  		 *
 346  		 * @param string[] $status_links An associative array of fully-formed comment status links. Includes 'All', 'Mine',
 347  		 *                              'Pending', 'Approved', 'Spam', and 'Trash'.
 348  		 */
 349  		return apply_filters( 'comment_status_links', $this->get_views_links( $status_links ) );
 350  	}
 351  
 352  	/**
 353  	 * @global string $comment_status
 354  	 *

PHP Documentation

<?php
/**
		 * Filters the comment status links.
		 *
		 * @since 2.5.0
		 * @since 5.1.0 The 'Mine' link was added.
		 *
		 * @param string[] $status_links An associative array of fully-formed comment status links. Includes 'All', 'Mine',
		 *                              'Pending', 'Approved', 'Spam', and 'Trash'.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-admin/includes/class-wp-comments-list-table.php
Related Hooks

Related hooks will be displayed here in future updates.