Yoast\WP\SEO\Abilities\User_Interface\Abilities

Abstract_SEO_Data_Ability::can_edit_advanced_metadata │ public │ Yoast 1.0

Checks whether the current user can edit advanced SEO metadata.

Gates the SEO data abilities on the same capability that gates the advanced and schema fields in the editors, so the abilities can never grant a field the editor UI denies. The capability helper also passes wpseo_manage_options holders. Per-entity edit access is enforced on top, in the execute callbacks.

Метод класса: Abstract_SEO_Data_Ability{}

Хуков нет.

Возвращает

bool. Whether the current user can edit advanced SEO metadata.

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

$Abstract_SEO_Data_Ability = new Abstract_SEO_Data_Ability();
$Abstract_SEO_Data_Ability->can_edit_advanced_metadata(): bool;

Код Abstract_SEO_Data_Ability::can_edit_advanced_metadata() Yoast 28.9

public function can_edit_advanced_metadata(): bool {
	return $this->capability_helper->current_user_can( 'wpseo_edit_advanced_metadata' );
}