Yoast\WP\SEO\Abilities\User_Interface
Abilities_Integration::register_get_post_seo_data_ability
Registers the get post SEO data ability.
Метод класса: Abilities_Integration{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->register_get_post_seo_data_ability(): void;
Код Abilities_Integration::register_get_post_seo_data_ability() Abilities Integration::register get post seo data ability Yoast 28.3
private function register_get_post_seo_data_ability(): void {
\wp_register_ability(
Ability_Categories_Integration::CATEGORY_SLUG . '/get-post-seo-data',
$this->get_shared_ability_args(
[
'label' => \__( 'Get Post SEO Data', 'wordpress-seo' ),
'description' => \__( 'Get the SEO data for a post. Identify the post by post_id, by permalink (URL), or by title keywords; the title may be a comma-separated list and returns the SEO data for every post matching any of the values, paginated most recently modified first (use the page parameter to reach older matches). At least one identifier is required. Only posts the current user is allowed to edit are returned.', 'wordpress-seo' ),
'input_schema' => $this->get_post_identifier_input_schema(),
'output_schema' => $this->wrap_in_array_schema( $this->get_post_seo_data_output_schema() ),
'permission_callback' => [ $this, 'can_edit_advanced_metadata' ],
'execute_callback' => [ $this->post_seo_data_collector, 'get_post_seo_data' ],
],
),
);
}