Yoast\WP\SEO\Presenters\Open_Graph

Image_Presenter::get()publicYoast 1.0

Gets the raw value of a presentation.

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

Хуков нет.

Возвращает

Массив. The raw value.

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

$Image_Presenter = new Image_Presenter();
$Image_Presenter->get();

Код Image_Presenter::get() Yoast 19.2

public function get() {
	$images = [];

	foreach ( $this->presentation->open_graph_images as $open_graph_image ) {
		$images[] = \array_intersect_key(
			// First filter the object.
			$this->filter( $open_graph_image ),
			// Then strip all keys that aren't in the image tags or the url.
			\array_flip( \array_merge( static::$image_tags, [ 'url' ] ) )
		);
	}

	return \array_filter( $images );
}