WPSEO_Import_Squirrly::import_post_values
Imports the data of a post out of Squirrly's DB table.
Метод класса: WPSEO_Import_Squirrly{}
Хуков нет.
Возвращает
true|false. Import status.
Использование
// private - только в коде основоного (родительского) класса $result = $this->import_post_values( $post_identifier );
- $post_identifier(разное) (обязательный)
- Post identifier, can be ID or string.
Код WPSEO_Import_Squirrly::import_post_values() WPSEO Import Squirrly::import post values Yoast 26.5
private function import_post_values( $post_identifier ) {
$data = $this->retrieve_post_data( $post_identifier );
if ( ! $data ) {
return false;
}
if ( ! is_numeric( $post_identifier ) ) {
$post_id = url_to_postid( $post_identifier );
}
if ( is_numeric( $post_identifier ) ) {
$post_id = (int) $post_identifier;
$data['focuskw'] = $this->maybe_add_focus_kw( $post_identifier );
}
foreach ( $this->seo_field_keys as $squirrly_key => $yoast_key ) {
$this->import_meta_helper( $squirrly_key, $yoast_key, $data, $post_id );
}
return true;
}