Yoast\WP\SEO\Routes

Settings_Introduction_Route::get_wistia_embed_permission()publicYoast 1.0

Gets the value of the wistia embed permission.

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

Хуков нет.

Возвращает

WP_REST_Response|WP_Error. The response, or an error.

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

$Settings_Introduction_Route = new Settings_Introduction_Route();
$Settings_Introduction_Route->get_wistia_embed_permission();

Код Settings_Introduction_Route::get_wistia_embed_permission() Yoast 20.4

public function get_wistia_embed_permission() {
	try {
		$value = $this->settings_introduction_action->get_wistia_embed_permission();
	} catch ( Exception $exception ) {
		return new WP_Error(
			'wpseo_settings_introduction_error',
			$exception->getMessage(),
			(object) []
		);
	}

	return new WP_REST_Response(
		[
			'json' => (object) [
				'value' => $value,
			],
		]
	);
}