WordPress.org

Ready to get started?Download WordPress

Forums

Use restrict_manage_posts to unset default filter? (1 post)

  1. leggo-my-eggo
    Member
    Posted 5 years ago #

    Hi, I'm trying to change the filters available on the edit posts listing in the admin screens. I've gotten most of what I want to get done done, but I need to remove the "Show all dates" filter and replace it with my own. I've figured out how to add a new one using restrict_manage_posts, but I'm unclear on how to remove the default.

    Here's what I've tried, but it appears that $defaults does not receive any values:

    add_action('restrict_manage_posts','my_restrict_manage_posts');
    function my_restrict_manage_posts($defaults) {
    	unset($defaults['m']);
    	return $defaults;
    }

    I got the $defaults['m'] bit from the name of the selector, but obviously this is wrong.

    Any pointers? I feel like I'm close, but just can't get there.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.