Use restrict_manage_posts to unset default filter?
-
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.
- The topic ‘Use restrict_manage_posts to unset default filter?’ is closed to new replies.