WordPress: Custom “favorite_actions”

Here is a function which creates a menu equivalent to the default. Edit it to suit your needs!

add_filter('favorite_actions', 'custom_admin_favs');
function custom_admin_favs($actions) {
	$actions1 = array(
		'post-new.php'=>array(__('New Post'),'edit_posts')
		'edit.php?post_status=draft'=>array(__('Drafts'),'edit_posts')
		'post-new.php?post_type=page'=>array(__('New Page'),'edit_pages')
		'media-new.php'=>array(__('Upload'),'upload_files')
		'edit-comments.php'=>array(__('Comments'),'moderate_comments')
	);
    return $actions;
}
custom favorite actions

The Favorte Action menu in WordPress

Related Posts:

  • No Related Posts
This entry was posted in Tech Tips, Web Development and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *