Yoast\WP\SEO\Actions\Importing\Aioseo

Aioseo_General_Settings_Importing_Action::import_company_logo()publicYoast 1.0

Imports the organization 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 company logo url.

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

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

Код Aioseo_General_Settings_Importing_Action::import_company_logo() Yoast 19.2

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

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

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