Yoast\WP\SEO\Generators\Schema\Third_Party

CoAuthor::generate()publicYoast 1.0

Returns Person Schema data.

{} Это метод класса: CoAuthor{}

Хуков нет.

Возвращает

true|false|Массив. Person data on success, false on failure.

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

$CoAuthor = new CoAuthor();
$CoAuthor->generate();

Код CoAuthor::generate() Yoast 19.7.1

public function generate() {
	$user_id = $this->determine_user_id();
	if ( ! $user_id ) {
		return false;
	}

	$data = $this->build_person_data( $user_id, true );

	$data['@type'] = 'Person';
	unset( $data['logo'] );

	// If this is a post and the author archives are enabled, set the author archive url as the author url.
	if ( $this->helpers->options->get( 'disable-author' ) !== true ) {
		$data['url'] = $this->helpers->user->get_the_author_posts_url( $user_id );
	}

	return $data;
}