Method | Description | |
---|---|---|
get_handler ( array $object, string $field_name, WP_REST_Request $request, string $object_type ) : mixed | Handler for getting custom field data. | |
pod_extends_core_route ( array | Pods $pod ) : boolean | Check if a Pod supports extending core REST response. | |
post_type_rest_support ( string $post_type_name, boolean | false $rest_base = false, string $controller = 'WP_REST_Posts_Controller' ) | Add REST API support to a post type | |
taxonomy_rest_support ( string $taxonomy_name, boolean | false $rest_base = false, string $controller = 'WP_REST_Terms_Controller' ) | Add REST API support to an already registered taxonomy. | |
write_handler ( mixed $value, object $object, string $field_name, WP_REST_Request $request, string $object_type ) : boolean | integer | Handler for updating custom field data. |
Method | Description | |
---|---|---|
get_pod ( $pod_name, $id ) : boolean | Pods | Get Pod object |
public static pod_extends_core_route ( array | Pods $pod ) : boolean | ||
$pod | array | Pods | Pod object or the pod_data array |
return | boolean |
public static post_type_rest_support ( string $post_type_name, boolean | false $rest_base = false, string $controller = 'WP_REST_Posts_Controller' ) | ||
$post_type_name | string | Name of post type |
$rest_base | boolean | false | Optional. Base url segment. If not set, post type name is used |
$controller | string | Optional, controller class for route. If not set "WP_REST_Posts_Controller" is used. |
public static taxonomy_rest_support ( string $taxonomy_name, boolean | false $rest_base = false, string $controller = 'WP_REST_Terms_Controller' ) | ||
$taxonomy_name | string | Taxonomy name. |
$rest_base | boolean | false | Optional. Base url segment. If not set, taxonomy name is used. |
$controller | string | Optional, controller class for route. If not set "WP_REST_Terms_Controller" is used. |
public static write_handler ( mixed $value, object $object, string $field_name, WP_REST_Request $request, string $object_type ) : boolean | integer | ||
$value | mixed | Value to write |
$object | object | The object from the response |
$field_name | string | Name of field |
$request | WP_REST_Request | Current request |
$object_type | string | Type of object |
return | boolean | integer |