3 Comments »
Leave a Comment
You must be logged in to post a comment.
/* Plugin Name: Google Analytics Plugin URI: http://blog.thedt.net/2005/11/14/google-analytics-plugin/ Description: allows the user to add their Google Analytics code to each blog page automaticly. Version: 0.1 Author: Matt Labrum Author URI: http://blog.thedt.net */ add_action('admin_menu','ga_menu'); add_action('admin_head','ga_addcode'); add_action('wp_head','ga_addcode'); function ga_addcode(){ $code = get_option('ga_code'); if(!empty($code))echo stripslashes($code); } function ga_menu(){ add_options_page('Google Analytics', 'Google Analytics', 9, __FILE__, 'ga_manage'); } function ga_manage(){ if(isset($_POST['ga_code'])){ update_option('ga_code', $_POST['ga_code']); echo '
Options saved.
Craig’s musings
You must be logged in to post a comment.
oh said,
November 17, 2003 at 10:54 pm
great
Jan said,
November 21, 2003 at 12:38 pm
Intrestign…
mark said,
April 19, 2004 at 11:45 am
Interesting, i wonder if it’s work on this website. Let me know by email: sm@bigserver.hopto.org