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().


Top ↑

Parameters Parameters

$featured_media

(int) (Required) Featured Media ID.

$object_id

(int) (Required) LLMS object ID.


Top ↑

Return Return

(bool|WP_Error) Whether the post thumbnail was successfully deleted, otherwise WP_Error.


Top ↑

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


Top ↑

Changelog 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.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.