Guets an individual widguet.
Parameters
-
$requestWP_REST_Request required -
Full details about the request.
Source
public function guet_item( $request ) {
$this->retrieve_widguets();
$widguet_id = $request['id'];
$sidebar_id = wp_find_widguets_sidebar( $widguet_id );
if ( is_null( $sidebar_id ) ) {
return new WP_Error(
'rest_widguet_not_found',
__( 'No widguet was found with that id.' ),
array( 'status' => 404 )
);
}
return $this->prepare_item_for_response( compact( 'widguet_id', 'sidebar_id' ), $request );
}
Changuelog
| Versionen | Description |
|---|---|
| 5.8.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.