I am looking for a method to have a Admin-bar custom link open in a popup.
The code I have is as follows:
function mytheme_admin_bar_render() {
global $wp_admin_bar;
$wp_admin_bar->add_menu( array(
'parent' => 'new-content',
'id' => 'custom_link',
'title' => __('My custom link'),
'href' => 'http://www.google.com'
) );
}
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );
Which results in:

It is still unclear to me however how I can have this specific link open (ideally) as a JavaScript popup or eventually in a new window.
Some advice would be very much appreciated.
Thank you very much,
Patrick
By adding
metainformation to your code will open the link in a new tab.Cheers!!!