Yoast\WP\SEO\Actions\SEMrush

SEMrush_Phrases_Action::to_result_object()protectedYoast 1.0

Converts the passed dataset to an object.

Метод класса: SEMrush_Phrases_Action{}

Хуков нет.

Возвращает

Объект. The result object.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->to_result_object( $result );
$result(массив) (обязательный)
The result dataset to convert to an object.

Код SEMrush_Phrases_Action::to_result_object() Yoast 22.3

protected function to_result_object( $result ) {
	return (object) [
		'results' => $result['data'],
		'status'  => $result['status'],
	];
}