Yoast\WP\SEO\Actions\Importing\Aioseo

Aioseo_General_Settings_Importing_Action::import_person_logo()publicYoast 1.0

Imports the person logo while also accounting for the id of the log to be saved in the separate Yoast option.

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

Хуков нет.

Возвращает

Строку. The transformed person logo url.

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

$Aioseo_General_Settings_Importing_Action = new Aioseo_General_Settings_Importing_Action();
$Aioseo_General_Settings_Importing_Action->import_person_logo( $logo_url );
$logo_url(строка) (обязательный)
The person logo url coming from AIOSEO settings.

Код Aioseo_General_Settings_Importing_Action::import_person_logo() Yoast 22.4

public function import_person_logo( $logo_url ) {
	$logo_id = $this->image->get_attachment_by_url( $logo_url );
	$this->options->set( 'person_logo_id', $logo_id );

	$this->options->set( 'person_logo_meta', false );
	$logo_meta = $this->image->get_attachment_meta_from_settings( 'person_logo' );
	$this->options->set( 'person_logo_meta', $logo_meta );

	return $this->url_import( $logo_url );
}