Insert option delete in adminbar Wordpress

1

Alright?

Well I'm doing a site with external links in every post .. but I came to doubt and if by chance this link is broken? I would have to click on the post > click edit post and then delete .. well I wanted a simple process let's say .. the idea I had was to insert a recycle bin icon in adminbar that icon would be invisible in the index and would only appear when I was actually in some "post ".. I can get here"

    function wpmidia_custom_toolbar_link($wp_admin_bar) {
    $args = array(
        'id' => 'gmail',
        'title' => 'Gmail', 
        'href' => 'https://mail.google.com/mail/#inbox', 
        'meta' => array(
            'class' => 'gmail', 
            'title' => 'My Gmail account',
                        'target' => '_blank'
            )
    );
    $wp_admin_bar->add_node($args);
}
add_action('admin_bar_menu', 'wpmidia_custom_toolbar_link', 999);

With this code I can insert "Gmail" into the adminbar but I can not insert the deletion function .. I do not insert there for you to see this code working.

    
asked by anonymous 30.09.2017 / 07:54

0 answers