WPSEO_Import_SEOPressor::import_seopressor_post_settings()
Imports the data. SEOpressor stores most of the data in one post array, this loops over it.
Метод класса: WPSEO_Import_SEOPressor{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->import_seopressor_post_settings( $post_id );
- $post_id(int) (обязательный)
- Post ID.
Код WPSEO_Import_SEOPressor::import_seopressor_post_settings() WPSEO Import SEOPressor::import seopressor post settings Yoast 23.4
private function import_seopressor_post_settings( $post_id ) { $settings = get_post_meta( $post_id, '_seop_settings', true ); foreach ( [ 'fb_description' => 'opengraph-description', 'fb_title' => 'opengraph-title', 'fb_type' => 'og_type', 'fb_img' => 'opengraph-image', 'meta_title' => 'title', 'meta_description' => 'metadesc', 'meta_canonical' => 'canonical', 'tw_description' => 'twitter-description', 'tw_title' => 'twitter-title', 'tw_image' => 'twitter-image', ] as $seopressor_key => $yoast_key ) { $this->import_meta_helper( $seopressor_key, $yoast_key, $settings, $post_id ); } if ( isset( $settings['meta_rules'] ) ) { $this->import_post_robots( $settings['meta_rules'], $post_id ); } }