Created
August 7, 2013 17:27
-
-
Save WerdsWords/6176333 to your computer and use it in GitHub Desktop.
#38: comment_status_links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Hide the Pending comments status link | |
* | |
* @see WP_Comments_List_Table::get_views() | |
* | |
* @param array $status_links An array of comment stati links. | |
* | |
* @return array The filtered comments stati links array. | |
*/ | |
function wpdocs_comments_status_links( $status_links ) { | |
// Remove the 'Pending' comments status link | |
if ( isset( $status_links['pending'] ) ) | |
unset( $status_links['pending'] ) | |
return $status_links; | |
} | |
add_filter( 'comment_status_links', 'wpdocs_comments_status_links' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment