LLMS_REST_Posts_Controller::handle_featured_media( int $featured_media, int $object_id )
Determines the featured media based on a request param
Description Description
Heavily based on WP_REST_Posts_Controller::handle_featured_media().
Parameters Parameters
- $featured_media
-
(int) (Required) Featured Media ID.
- $object_id
-
(int) (Required) LLMS object ID.
Return Return
(bool|WP_Error) Whether the post thumbnail was successfully deleted, otherwise WP_Error.
Source Source
File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-posts-controller.php
if ( ! get_post_status_object( $status ) ) { $status = 'draft'; } break; } return $status; } /** * Determines the featured media based on a request param * * Heavily based on WP_REST_Posts_Controller::handle_featured_media(). * * @since 1.0.0-beta.1
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.18 | Fixed call to undefined function llms_bad_request_error() , must be llms_rest_bad_request_error() . |
1.0.0-beta.1 | Introduced. |