CodeExplorer handle_featured_media example
$schema =
$this->
get_item_schema();
if ( !
empty( $schema['properties'
]['sticky'
] ) ) { if ( !
empty( $request['sticky'
] ) ) { stick_post( $post_id );
} else { unstick_post( $post_id );
} } if ( !
empty( $schema['properties'
]['featured_media'
] ) &&
isset( $request['featured_media'
] ) ) { $this->
handle_featured_media( $request['featured_media'
],
$post_id );
} if ( !
empty( $schema['properties'
]['format'
] ) && !
empty( $request['format'
] ) ) { set_post_format( $post,
$request['format'
] );
} if ( !
empty( $schema['properties'
]['template'
] ) &&
isset( $request['template'
] ) ) { $this->
handle_template( $request['template'
],
$post_id, true
);
} $terms_update =
$this->
handle_terms( $post_id,
$request );