Yoast\WP\SEO\Introductions\User_Interface
Wistia_Embed_Permission_Route::get_wistia_embed_permission
Gets the value of the wistia embed permission.
Метод класса: Wistia_Embed_Permission_Route{}
Хуков нет.
Возвращает
WP_REST_Response|WP_Error. The response, or an error.
Использование
$Wistia_Embed_Permission_Route = new Wistia_Embed_Permission_Route(); $Wistia_Embed_Permission_Route->get_wistia_embed_permission();
Код Wistia_Embed_Permission_Route::get_wistia_embed_permission() Wistia Embed Permission Route::get wistia embed permission Yoast 27.4
public function get_wistia_embed_permission() {
try {
$user_id = $this->user_helper->get_current_user_id();
$value = $this->wistia_embed_permission_repository->get_value_for_user( $user_id );
} catch ( Exception $exception ) {
return new WP_Error(
'wpseo_wistia_embed_permission_error',
$exception->getMessage(),
(object) [],
);
}
return new WP_REST_Response(
[
'json' => (object) [
'value' => $value,
],
],
);
}