PluginProbe
Pods – Custom Content Types and Fields / 3.2.8.4
Pods – Custom Content Types and Fields v3.2.8.4
2.7.31.4 2.8.23.5 2.9.19.5 3.0.10.5 3.1.4.3 3.2.8.4 3.3.9.2 2.8.23.4 2.9.19.4 3.0.10.4 3.1.4.2 3.2.8.3 3.3.9.1 trunk 1.14.8 2.7.31.3 2.8.23.3 2.9.19.3 3.0.10.3 3.1.4.1 3.2.0 3.2.1 3.2.1.1 3.2.2 3.2.4 All 42 releases
pods / src / Pods / REST / Interfaces / Endpoints / UPDATE_Interface.php
UPDATE_Interface.php
48 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Pods\REST\Interfaces\Endpoints;
4
5 use WP_Error;
6 use WP_REST_Request;
7 use WP_REST_Response;
8
9 /**
10 * UPDATE endpoint interface.
11 *
12 * @credit The Events Calendar team - https://github.com/the-events-calendar/tribe-common
13 *
14 * @since 3.0
15 */
16 interface UPDATE_Interface {
17 /**
18 * Handles UPDATE requests on the endpoint.
19 *
20 * @since 3.0
21 *
22 * @param WP_REST_Request $request
23 *
24 * @return WP_Error|WP_REST_Response An array containing the data of the updated post on
25 * success or a WP_Error instance on failure.
26 */
27 public function update( WP_REST_Request $request );
28
29 /**
30 * Returns the content of the `args` array that should be used to register the endpoint
31 * with the `register_rest_route` function.
32 *
33 * @since 3.0
34 *
35 * @return array
36 */
37 public function EDIT_args();
38
39 /**
40 * Whether the current user can update content of this type or not.
41 *
42 * @since 3.0
43 *
44 * @return bool Whether the current user can update or not.
45 */
46 public function can_edit();
47 }
48