/admin/metabox/class-metabox-analysis-seo.php

  1. <?php 
  2. /** 
  3. * @package WPSEO\Admin\Metabox 
  4. */ 
  5.  
  6. /** 
  7. * Represents the SEO analysis 
  8. */ 
  9. class WPSEO_Metabox_Analysis_SEO implements WPSEO_Metabox_Analysis { 
  10.  
  11. /** 
  12. * Whether this analysis is enabled. 
  13. * 
  14. * @return bool Whether or not this analysis is enabled. 
  15. */ 
  16. public function is_enabled() { 
  17. return $this->is_globally_enabled() && $this->is_user_enabled(); 
  18.  
  19. /** 
  20. * Whether or not this analysis is enabled by the user. 
  21. * 
  22. * @return bool Whether or not this analysis is enabled by the user. 
  23. */ 
  24. public function is_user_enabled() { 
  25. return ! get_the_author_meta( 'wpseo_keyword_analysis_disable', get_current_user_id() ); 
  26.  
  27. /** 
  28. * Whether or not this analysis is enabled globally. 
  29. * 
  30. * @return bool Whether or not this analysis is enabled globally. 
  31. */ 
  32. public function is_globally_enabled() { 
  33. $options = WPSEO_Options::get_option( 'wpseo' ); 
  34.  
  35. return (bool) $options['keyword_analysis_active']; 
.