Ejemplo n.º 1
0
 /**
  * Class constructor
  */
 public function __construct()
 {
     parent::__construct();
     if (isset($this->options['tag_links_in_rss']) && $this->options['tag_links_in_rss'] == 1) {
         add_filter('the_permalink_rss', array($this, 'rsslinktagger'), 99);
     }
     // Check if the customer is running Universal or not (Enable in GA Settings -> Universal)
     if (isset($this->options['enable_universal']) && $this->options['enable_universal'] == 1) {
         require_once 'class-universal.php';
     } else {
         require_once 'class-ga-js.php';
     }
 }
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     add_action('plugins_loaded', array($this, 'init_ga'));
     // Only run admin_init when there is a cron jon executed.
     $current_page = filter_input(INPUT_GET, 'page');
     // Only when current page is not 'wpseo'.
     if (strpos($current_page, 'wpseo') !== 0) {
         if ($this->is_running_cron() || $this->is_running_ajax() || strpos($current_page, 'yst_ga') === 0) {
             add_action('admin_init', array($this, 'init_settings'));
         }
     }
 }
Ejemplo n.º 3
0
 /**
  * Class constructor
  */
 public function __construct()
 {
     parent::__construct();
     if (isset($this->options['tag_links_in_rss']) && $this->options['tag_links_in_rss'] == 1) {
         add_filter('the_permalink_rss', array($this, 'rsslinktagger'), 99);
     }
     // Check if the customer is running Universal or not (Enable in GA Settings -> Universal)
     if (isset($this->options['enable_universal']) && $this->options['enable_universal'] == 1) {
         global $yoast_ga_universal;
         $yoast_ga_universal = new Yoast_GA_Universal();
     } else {
         global $yoast_ga_js;
         $yoast_ga_js = new Yoast_GA_JS();
     }
 }
Ejemplo n.º 4
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     add_action('plugins_loaded', array($this, 'init_ga'));
     add_action('admin_init', array($this, 'init_settings'));
 }