Open_Graph_Image_Generator::generate_for_author_archive()publicYoast 1.0

Retrieves the images for an author archive indexable.

This is a custom method to address the case of Author Archives, since they always have an Open Graph image set in the indexable (even if it is an empty default Gravatar).

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

Хуков нет.


Массив. The images.


$Open_Graph_Image_Generator = new Open_Graph_Image_Generator();
$Open_Graph_Image_Generator->generate_for_author_archive( $context );
$context(Meta_Tags_Context) (обязательный)
The context.

Код Open_Graph_Image_Generator::generate_for_author_archive() Yoast 19.6.1

public function generate_for_author_archive( Meta_Tags_Context $context ) {
	$image_container = $this->get_image_container();

	$this->add_from_templates( $context, $image_container );
	if ( $image_container->has_images() ) {
		return $image_container->get_images();

	return $this->generate( $context );