Yoast\WP\SEO\Abilities\User_Interface\Abilities

Get_Readability_Scores_Ability{} │ Yoast 1.0└─ Abstract_Score_Ability

The ability that returns the readability scores of the most recently modified posts.

Хуков нет.

Использование

$Get_Readability_Scores_Ability = new Get_Readability_Scores_Ability();
// use class methods

Методы

  1. public get_name()
  2. protected get_description()
  3. protected get_execute_callback()
  4. protected get_feature_name()
  5. protected get_label()

Код Get_Readability_Scores_Ability{} Yoast 28.9

class Get_Readability_Scores_Ability extends Abstract_Score_Ability {

	/**
	 * Returns the full name of the ability.
	 *
	 * @return string The ability name.
	 */
	public function get_name(): string {
		return Ability_Categories_Integration::CATEGORY_SLUG . '/get-readability-scores';
	}

	/**
	 * Returns the name of the analysis feature the ability depends on.
	 *
	 * @return string The analysis feature name.
	 */
	protected function get_feature_name(): string {
		return Readability_Analysis::NAME;
	}

	/**
	 * Returns the label of the ability.
	 *
	 * @return string The label.
	 */
	protected function get_label(): string {
		return \__( 'Get Readability Scores', 'wordpress-seo' );
	}

	/**
	 * Returns the description of the ability.
	 *
	 * @return string The description.
	 */
	protected function get_description(): string {
		return \__( 'Get the readability scores for the most recently modified posts.', 'wordpress-seo' );
	}

	/**
	 * Returns the callback that executes the ability.
	 *
	 * @return array<int, object|string> The execute callback.
	 */
	protected function get_execute_callback(): array {
		return [ $this->score_retriever, 'get_readability_scores' ];
	}
}