-
-
Save dharmeshtops/b60569f9d9106f16cc58845dba1482da to your computer and use it in GitHub Desktop.
Adding a Google Analytics Link to the Wordpress Dashboard
This file contains 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