comment_status_links
Filters the comment status links.
Использование
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'.
Список изменений
| С версии 2.5.0 | Введена. |
| С версии 5.1.0 | The 'Mine' link was added. |
Где вызывается хук
comment_status_links
wp-admin/includes/class-wp-comments-list-table.php 354
return apply_filters( 'comment_status_links', $this->get_views_links( $status_links ) );