Add Some Fancy to the Edit Page/Post Link

Inspired by this tweet.

Add a little bit of fancy to your edit link in the Admin Bar with this:

add_action( 'wp_before_admin_bar_render', 'adminbar_tweaks');

function adminbar_tweaks() {
    global $wp_admin_bar;

    if (isset( $wp_admin_bar->menu->edit['title'] ) ) {
        $title = $wp_admin_bar->menu->edit['title'];
        if ( substr( $title, 0, 5 ) == 'Edit ' ) {
            $hand = '<span style="font-size:20px;margin:-1px 3px 0 0;float:left;">✍</span>';
            $wp_admin_bar->menu->edit['title'] = $hand.$title;
        }
    }

}