Yoast\WP\SEO\Bulk_Editor\Domain\Updates
Update_Result::to_array
Parses the result to the expected key value representation.
Метод класса: Update_Result{}
Хуков нет.
Возвращает
array<string,. int|bool|string|array<string, string>> The result presented as the expected key value representation.
Использование
$Update_Result = new Update_Result(); $Update_Result->to_array(): array;
Код Update_Result::to_array() Update Result::to array Yoast 28.9
public function to_array(): array {
$array = [
'id' => $this->post_id,
'success' => $this->success,
];
if ( ! $this->success ) {
$array['error'] = $this->error_code;
}
if ( $this->rendered !== [] ) {
$array['rendered'] = $this->rendered;
}
if ( $this->sanitized !== [] ) {
$array['sanitized'] = $this->sanitized;
}
return $array;
}