delete_post_thumbnail( int|WP_Post $post ): bool

In this article

Removes the thumbnail (featured image) from the given post.

Parameters

$postint|WP_Postrequired
Post ID or post object from which the thumbnail should be removed.

Return

bool True on success, false on failure.

Source

// Now look for larger loops.
$loop = wp_find_hierarchy_loop( 'wp_get_post_parent_id', $post_id, $post_parent );
if ( ! $loop ) {
	return $post_parent; // No loop.
}

// Setting $post_parent to the given value causes a loop.

Changelog

VersionDescription
3.3.0Introduced.

User Contributed Notes

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