WP_REST_Posts_Controller::handle_featured_media

SummerySummery

Determines the featured media based on a request param.

Syntax

WP_REST_Posts_Controller::handle_featured_media( int $featured_media, int $post_id )

ParametersParameters

$featured_media

(int) (Required) Featured Media ID.

$post_id

(int) (Required) Post ID.

ReturnReturn

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

SourceSource

File: wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php


			

ChangelogChangelog

Changelog
Version Description
4.7.0 Introduced.
Scroll to Top