This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ku-www/wp-content/plugins/wordpress-seo/admin/metabox/class-metabox-analysis-readability.php
2017-04-26 22:03:15 +02:00

40 lines
951 B
PHP

<?php
/**
* @package WPSEO\Admin\Metabox
*/
/**
* Represents the readability analysis
*/
class WPSEO_Metabox_Analysis_Readability implements WPSEO_Metabox_Analysis {
/**
* Whether this analysis is enabled.
*
* @return bool Whether or not this analysis is enabled.
*/
public function is_enabled() {
return $this->is_globally_enabled() && $this->is_user_enabled();
}
/**
* Whether or not this analysis is enabled by the user.
*
* @return bool Whether or not this analysis is enabled by the user.
*/
public function is_user_enabled() {
return ! get_the_author_meta( 'wpseo_content_analysis_disable', get_current_user_id() );
}
/**
* Whether or not this analysis is enabled globally.
*
* @return bool Whether or not this analysis is enabled globally.
*/
public function is_globally_enabled() {
$options = WPSEO_Options::get_option( 'wpseo_titles' );
return (bool) $options['content-analysis-active'];
}
}