delete_post_thumbnail( int|WP_Post $post )
Removes the thumbnail (featured image) from the given post.
Description Description
Parameters Parameters
- $post
-
(int|WP_Post) (Required) Post ID or post object from which the thumbnail should be removed.
Return Return
(bool) True on success, false on failure.
Source Source
File: wp-includes/post.php
function delete_post_thumbnail( $post ) { $post = get_post( $post ); if ( $post ) { return delete_post_meta( $post->ID, '_thumbnail_id' ); } return false; }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.3.0 | Introduced. |