Forked from mrbobbybryant/gist:3f5ec4f224ad8ca8cd06
Created
July 25, 2017 08:39
Adding a Google Analytics Link to the Wordpress Dashboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function dwwp_add_google_link() { | |
global $wp_admin_bar; | |
$wp_admin_bar->add_menu( array( | |
'id' => 'google_analytics', | |
'title' => 'Google Analytics', | |
'href' => 'http://google.com/analytics/' | |
) ); | |
} | |
add_action( 'wp_before_admin_bar_render', 'dwwp_add_google_link' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment