In this short blog post, we’ll show you a PHP function to insert a custom menu toolbar link in the WordPress Admin Dashboard

PHP function to insert a custom or personalised widget in WordPress Admin Dashboard
<?php
/*--------------------------------------------------------------
INSERT LINK TO THE WP TOOLBAR
--------------------------------------------------------------*/ 
function btwp_insert_custom_toolbar_link($wp_admin_bar) {
$args = array(
'id' => 'andersonn',
'title' => 'Andersonn', 
'href' => 'https://github.com/theandersonn', 
'meta' => array(
'class' => 'andersonn', 
'title' => 'Andersonn'
)
);
$wp_admin_bar->add_node($args);
}
add_action('admin_bar_menu', 'btwp_insert_custom_toolbar_link', 999);

Tags: wp, wordpress, dashboard, php, add_action, admin_bar_menu, custom_toolbar_link