LLMS_REST_Webhooks_Controller::prepare_object_for_response( LLMS_Abstract_User_Data $object, WP_REST_Request $request )
Prepare an object for response.
Parameters Parameters
- $object
-
(LLMS_Abstract_User_Data) (Required) User object.
- $request
-
(WP_REST_Request) (Required) Request object.
Return Return
(array)
Source Source
File: libraries/lifterlms-rest/includes/server/class-llms-rest-webhooks-controller.php
protected function prepare_object_for_response( $object, $request ) { $prepared = parent::prepare_object_for_response( $object, $request ); $prepared['id'] = absint( $prepared['id'] ); $prepared['resource'] = $object->get_resource(); $prepared['event'] = $object->get_event(); $prepared['hooks'] = $object->get_hooks(); $prepared['created'] = mysql_to_rfc3339( $prepared['created'] ); $prepared['updated'] = mysql_to_rfc3339( $prepared['updated'] ); return $prepared; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.3 | Introduced. |