Yoast\WP\SEO\Abilities\Infrastructure

Author_Schema_Field_Map::get_pronouns_description │ private │ Yoast 1.0

Returns the description of the pronouns field, which tells agents upfront when the pronouns cannot be set.

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

Хуков нет.

Возвращает

string. The description.

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

// private - только в коде основоного (родительского) класса
$result = $this->get_pronouns_description(): string;

Код Author_Schema_Field_Map::get_pronouns_description() Yoast 28.9

private function get_pronouns_description(): string {
	$description = \__( 'The pronouns of the user, like "she/her", "he/him" or "they/them".', 'wordpress-seo' );

	if ( ! $this->author_pronouns->is_setting_enabled() ) {
		return $description . ' ' . \__( 'Author archives are disabled on this site, so the pronouns cannot be changed.', 'wordpress-seo' );
	}

	// The current user is not known yet when the abilities are registered, so this cannot depend on them.
	return $description . ' ' . \__( 'Only users who can edit other users can change them.', 'wordpress-seo' );
}