=' ) && !isset( $options['tracking_popup'] ) )
require_once plugin_dir_path( __FILE__ ) . 'class-pointer.php';
class GA_Admin extends Yoast_GA_Plugin_Admin {
var $hook = 'google-analytics-for-wordpress';
var $longname = '';
var $shortname = '';
var $ozhicon = 'images/chart_curve.png';
var $optionname = 'Yoast_Google_Analytics';
var $homepage = 'http://yoast.com/wordpress/google-analytics/';
var $toc = '';
/**
* Constructur, load all required stuff.
*/
function __construct() {
$this->longname = __( 'Google Analytics Configuration', 'gawp' );
$this->shortname = __( 'Google Analytics', 'gawp' );
$this->upgrade();
$this->plugin_url = plugins_url( '', __FILE__ ) . '/';
// Register the settings page
add_action( 'admin_menu', array( &$this, 'register_settings_page' ) );
// Register the contextual help for the settings page
// add_action( 'contextual_help', array(&$this, 'plugin_help'), 10, 3 );
// Give the plugin a settings link in the plugin overview
add_filter( 'plugin_action_links', array( &$this, 'add_action_link' ), 10, 2 );
// Print Scripts and Styles
add_action( 'admin_print_scripts', array( &$this, 'config_page_scripts' ) );
add_action( 'admin_print_styles', array( &$this, 'config_page_styles' ) );
// Print stuff in the settings page's head
add_action( 'admin_head', array( &$this, 'config_page_head' ) );
// Drop a warning on each page of the admin when Google Analytics hasn't been configured
add_action( 'admin_footer', array( &$this, 'warning' ) );
// Save settings
// TODO: replace with Options API
add_action( 'admin_init', array( &$this, 'save_settings' ) );
// Authenticate
add_action( 'admin_init', array( &$this, 'authenticate' ) );
}
function config_page_head() {
global $current_screen;
if ( 'settings_page_' . $this->hook == $current_screen->id ) {
?>
hook ) {
$contextual_help = '
' . __( 'Having problems?', 'gawp' ) . '
' .
'
' . sprintf( __( "If you're having problems with this plugin, please refer to its FAQ page.", 'gawp' ), 'http://yoast.com/wordpress/google-analytics/ga-wp-faq/' ) . '
" . __( "Google Analytics is not active.", 'gawp' ) . " " . sprintf( __( "You must %sselect which Analytics Profile to track%s before it can work.", 'gawp' ), "", "" ) . "