WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Yoast\WP\SEO\Routes

Workouts_Route::set_workouts() public Yoast 1.0

Sets the workout configuration.

{} Это метод класса: Workouts_Route{}

Хуки из метода

Возвращает

WP_REST_Response. the configuration of the workouts.

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

$Workouts_Route = new Workouts_Route();
$Workouts_Route->set_workouts( $request );
$request(WP_Rest_Request) (обязательный)
The request object.

Код Workouts_Route::set_workouts() Yoast 17.9

public function set_workouts( $request ) {
	$workouts_data = $request->get_json_params();

	$free_workouts_data                  = [];
	$free_workouts_data['configuration'] = $workouts_data['configuration'];

	$result = $this->options_helper->set( 'workouts_data', $free_workouts_data );

	if ( count( $free_workouts_data['configuration']['finishedSteps'] ) === 5 ) {
		$this->options_helper->set( 'first_time_install', false );
	}

	/**
	 * Filter: 'Yoast\WP\SEO\workouts_route_save' - Allows the add-ons to save the options data in their own options.
	 *
	 * @api mixed|null $result The result of the previous saving operation.
	 *
	 * @param array $workouts_data The full set of workouts option data to save.
	 */
	$result = \apply_filters( 'Yoast\WP\SEO\workouts_route_save', $result, $workouts_data );

	return new WP_REST_Response(
		[ 'json' => $result ]
	);
}