WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Получай пассивный доход от сайта с помощью браузерных PUSH уведомлений
функция не описана

Yoast\WP\SEO\Helpers

Image_Helper::get_attachment_meta_from_settings() public Yoast 1.0

Based on and image ID return array with the best variation of that image. If it's not saved to the DB, save it to an option.

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

Хуков нет.

Возвращает

Массив/true|false. Array with image details when the image is found, boolean when it's not found.

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

$Image_Helper = new Image_Helper();
$Image_Helper->get_attachment_meta_from_settings( $setting );
$setting(строка) (обязательный)
The setting name. Should be company or person.

Код Image_Helper::get_attachment_meta_from_settings() Yoast 16.1.1

<?php
public function get_attachment_meta_from_settings( $setting ) {
	$image_meta = $this->options->get( $setting . '_meta', false );
	if ( ! $image_meta ) {
		$image_id = $this->options->get( $setting . '_id', false );
		if ( $image_id ) {
			// There is not an option to put a URL in an image field in the settings anymore, only to upload it through the media manager.
			// This means an attachment always exists, so doing this is only needed once.
			$image_meta = $this->get_best_attachment_variation( $image_id );
			$this->options->set( $setting . '_meta', $image_meta );
		}
	}

	return $image_meta;
}