REST_API
REST API Controller class.
Namespace: WebberZone\WFP\Frontend
Since: 3.2.0
Source: includes/frontend/class-rest-api.php line 23
Extends: WP_REST_Controller
Methods
register_routes()
Register the routes for the objects of the controller.
Since: 3.2.0
Line: 39
public function register_routes( );
permissions_check()
Permissions callback for REST endpoints.
Since: 3.2.0
Line: 75
public function permissions_check( $request ): bool|\WP_Error;
| Type | Name | Description |
|---|---|---|
\WP_REST_Request | $request | Request instance. |
Returns: bool|\WP_Error
get_tracker_args()
Get the arguments for the tracker endpoint.
Since: 3.2.0
Line: 96
public function get_tracker_args( ): array;
Returns: array — Arguments.
get_followed_posts_args()
Get the arguments for the followed posts endpoint.
Since: 3.2.0
Line: 126
public function get_followed_posts_args( ): array;
Returns: array — Arguments.
update_tracker()
Update the tracker.
Since: 3.2.0
Line: 162
public function update_tracker( $request ): \WP_REST_Response|\WP_Error;
| Type | Name | Description |
|---|---|---|
\WP_REST_Request | $request | Full data about the request. |
Returns: \WP_REST_Response|\WP_Error — Response object on success, or WP_Error object on failure.
get_followed_posts()
Get followed posts for a specific post.
Since: 3.2.0
Line: 190
public function get_followed_posts( $request ): \WP_REST_Response|\WP_Error;
| Type | Name | Description |
|---|---|---|
\WP_REST_Request | $request | Full data about the request. |
Returns: \WP_REST_Response|\WP_Error — Response object on success, or WP_Error object on failure.