Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Solution for http://wptavern.com/a-proposed-enhancement-that-saves-a-mouse-click-when-upgrading-wordpress-plugins#comment-56798
- add_filter('add_menu_classes', 'um_add_clickable_numbers');
- function um_add_clickable_numbers($menu) {
- foreach ($menu as $key => $menu_item) {
- if (strpos($menu_item, 'Comments ') == 0) {
- $re = "/(Comments) (.*)$/";
- $subst = '$1</a> <a href="edit-comments.php?comment_status=moderated">$2';
- $menu[$key][0] = preg_replace($re, $subst, $menu[$key][0], 1);
- }
- }
- return $menu;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement