WPSEO_Import_AIOSEO::import_post_opengraph()privateYoast 1.0

Imports the OpenGraph and Twitter settings for a single post.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

// private - только в коде основоного (родительского) класса
$result = $this->import_post_opengraph( $post_id );
$post_id(int) (обязательный)
Post ID.

Код WPSEO_Import_AIOSEO::import_post_opengraph() Yoast 22.3

private function import_post_opengraph( $post_id ) {
	$meta = get_post_meta( $post_id, '_aioseop_opengraph_settings', true );
	$meta = maybe_unserialize( $meta );

	foreach ( $this->import_keys as $old_key => $new_key ) {
		$this->maybe_save_post_meta( $new_key, $meta[ $old_key ], $post_id );
	}
}