WPSEO_Metabox_Analysis_SEO

Represents the SEO analysis.

Defined (1)

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

/admin/metabox/class-metabox-analysis-seo.php  
  1. class WPSEO_Metabox_Analysis_SEO implements WPSEO_Metabox_Analysis { 
  2.  
  3. /** 
  4. * Whether this analysis is enabled. 
  5. * @return bool Whether or not this analysis is enabled. 
  6. */ 
  7. public function is_enabled() { 
  8. return $this->is_globally_enabled() && $this->is_user_enabled(); 
  9.  
  10. /** 
  11. * Whether or not this analysis is enabled by the user. 
  12. * @return bool Whether or not this analysis is enabled by the user. 
  13. */ 
  14. public function is_user_enabled() { 
  15. return ! get_the_author_meta( 'wpseo_keyword_analysis_disable', get_current_user_id() ); 
  16.  
  17. /** 
  18. * Whether or not this analysis is enabled globally. 
  19. * @return bool Whether or not this analysis is enabled globally. 
  20. */ 
  21. public function is_globally_enabled() { 
  22. $options = WPSEO_Options::get_option( 'wpseo' ); 
  23.  
  24. return (bool) $options['keyword_analysis_active'];