Yoast\WP\SEO\Bulk_Editor\Domain\Posts
Post::to_array
Parses the post to the expected key value representation.
Метод класса: Post{}
Хуков нет.
Возвращает
array<string,. int|string|bool|array<string, bool>> The post presented as the expected key value representation.
Использование
$Post = new Post(); $Post->to_array(): array;
Код Post::to_array() Post::to array Yoast 28.7
public function to_array(): array {
return [
'id' => $this->id,
'title' => $this->title,
'status' => $this->status,
'edit_link' => $this->edit_link,
'focus_keyphrase' => $this->focus_keyphrase,
'seo_title' => $this->seo_title,
'meta_description' => $this->meta_description,
'social_title' => $this->social_title,
'social_description' => $this->social_description,
'seo_title_fallback' => $this->seo_title_fallback,
'meta_description_fallback' => $this->meta_description_fallback,
'social_title_fallback' => $this->social_title_fallback,
'social_description_fallback' => $this->social_description_fallback,
'editable' => $this->editable,
'needs_improvement' => \array_merge(
[
'seo_title' => false,
'meta_description' => false,
'social_title' => false,
'social_description' => false,
],
$this->needs_improvement,
),
];
}