WPSEO_Import_AIOSEO::import_opengraph
Imports the OpenGraph and Twitter settings for all posts.
Метод класса: WPSEO_Import_AIOSEO{}
Хуков нет.
Возвращает
true|false.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->import_opengraph();
Код WPSEO_Import_AIOSEO::import_opengraph() WPSEO Import AIOSEO::import opengraph Yoast 26.7
protected function import_opengraph() {
$query_posts = new WP_Query( 'post_type=any&meta_key=_aioseop_opengraph_settings&order=ASC&fields=ids&nopaging=true' );
if ( ! empty( $query_posts->posts ) ) {
foreach ( array_values( $query_posts->posts ) as $post_id ) {
$this->import_post_opengraph( $post_id );
}
}
return true;
}