Add Link to Favorites Drop Down

I saw a post today about making a quick action button always there that required you to edit the core wordpress files. This made me cringe a little bit, I have only had to do this once for a wordpress install. And I always forget when I upgrade and the site gets borked. So I decided to steal a function from wp cache that does this exact same thing.

I have no uses for this as I can navigate to any area that I want to, pretty easily. Just putting it out there for other plugin/theme developers.


function my_favorite_action( $actions ) {

$actions[ wp_nonce_url( 'edit-comments.php', 'wp-cache' ) ] = array( __( 'Manage Comments' ), 'manage_options' );

return $actions;
}
add_filter( 'favorite_actions', 'my_favorite_action' );

The only section that you need to edit is the edit-comments.php, and just point that to where you want the link to go. And the Manage Comments will be the text that is displayed.

About Weston Deboer

I like to use wordpress for any and every website that I work on. No matter how big or how small the website is.
This entry was posted in Wordpress and tagged , , , . Bookmark the permalink.

One Response to Add Link to Favorites Drop Down

  1. Rilwis says:

    A small tip but useful. Thanks.

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>