Yoast_GA_Settings

Settings class.

Defined (1)

The class is defined in the following location(s).

/includes/class-settings.php  
  1. class Yoast_GA_Settings { 
  2.  
  3. /** 
  4. * Saving instance of it's own in this static var 
  5. * @var object 
  6. */ 
  7. private static $instance; 
  8.  
  9. /** 
  10. * Store the options class instance 
  11. * @var mixed|void 
  12. */ 
  13. private $options_class; 
  14.  
  15. /** 
  16. * @var array $options The main GA options 
  17. */ 
  18. private $options; 
  19.  
  20. /** 
  21. * Set the options of Google Analytics 
  22. */ 
  23. protected function __construct() { 
  24. $this->options_class = Yoast_GA_Options::instance(); 
  25. $this->options = $this->options_class->get_options(); 
  26.  
  27. /** 
  28. * Getting instance of this object. If instance doesn't exists it will be created. 
  29. * @return object|Yoast_GA_Settings 
  30. */ 
  31. public static function get_instance() { 
  32. if ( is_null( self::$instance ) ) { 
  33. self::$instance = new Yoast_GA_Settings(); 
  34.  
  35. return self::$instance; 
  36.  
  37. /** 
  38. * Return the Dashboards disabled bool 
  39. * @return bool 
  40. */ 
  41. public function dashboards_disabled() { 
  42. return $this->options_class->option_value_to_bool( 'dashboards_disabled' ); 
  43.