WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to find the hook for adding a filter to the list under "Posts [Add New]":

enter image description here

share|improve this question
up vote 2 down vote accepted

You can use views_edit-post hook to do so. It is a possible variation of views_{$this->screen->id} and resides in class-wp-list-table.php.

add_filter('views_edit-post', 'my_post_views' );
function my_post_views( $views ){
    $views['html_class_name_for_li'] = 'the html'; // ex: <a href="#">something (11)</a>
    return $views;
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.