Placing WordPress plugin name at the top of the amdin header

This is not the correct way to do it. Please check the WordPress Codex and refer to the function add_node: https://codex.wordpress.org/Function_Reference/add_node

add_action( ‘admin_bar_menu’, ‘toolbar_link_to_mypage’, 999 );

function toolbar_link_to_mypage( $wp_admin_bar ) {
    $args = array(
        'id'    => 'my_page',
        'title' => 'My Page',
        'href'  => 'http://example.com/my-page/',
        'meta'  => array( 'class' => 'my-toolbar-page' )
    );
    $wp_admin_bar->add_node( $args );
}

Leave a Comment