/**
  * Initialize the premium functionality.
  *
  * This method will call specific method for initialising the admin or frontend functionality.
  *
  * It will even add the hook for default options.
  */
 public static function init()
 {
     self::$ga_options = Yoast_GA_Options::instance()->get_options();
     if (is_admin()) {
         self::init_admin();
     } else {
         self::init_frontend();
     }
     add_action('plugins_loaded', array('Yoast_GA_Premium', 'load_textdomain'));
     add_filter('yst_ga_default-ga-values', array('Yoast_GA_Premium', 'add_default_options'), 10, 2);
 }
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
// This plugin was originally based on Rich Boakes' Analytics plugin: http://boakes.org/analytics, but has since been rewritten and refactored multiple times.
define('GA_YOAST_PREMIUM_VERSION', '5.4.6');
define('GAWP_VERSION', '5.4.6');
define('GAWP_FILE', __FILE__);
define('GAWP_PATH', plugin_basename(__FILE__));
define('GAWP_URL', trailingslashit(plugin_dir_url(__FILE__)));
if (file_exists(dirname(GAWP_FILE) . '/vendor/autoload_52.php')) {
    require dirname(GAWP_FILE) . '/vendor/autoload_52.php';
}
if (!class_exists('Yoast_GA_Premium_Autoload', false)) {
    require_once 'premium/class-ga-autoload.php';
}
if (!class_exists('Yoast_GA_Premium', false)) {
    Yoast_GA_Premium::init();
}
// Only require the needed classes
if (is_admin()) {
    global $yoast_ga_admin;
    $yoast_ga_admin = new Yoast_GA_Admin();
} else {
    global $yoast_ga_frontend;
    $yoast_ga_frontend = new Yoast_GA_Frontend();
}
/* ***************************** BOOTSTRAP / HOOK INTO WP *************************** */
$spl_autoload_exists = function_exists('spl_autoload_register');
$filter_input_exists = function_exists('filter_input');
if (!$spl_autoload_exists) {
    add_action('admin_init', 'yoast_wpseo_self_deactivate_spl', 1);
}