wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



delete_post_thumbnail › WordPress Function

Da3.3.0
Deprecaton/a
delete_post_thumbnail ( $post )
Parametri:
  • (int|WP_Post) $post Post ID or post object from which the thumbnail should be removed.
    Richiesto:
Ritorna:
  • (bool) True on success, false on failure.
Definito a:
Codex:

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



Sorgenti

function delete_post_thumbnail( $post ) {
	$post = get_post( $post );
	if ( $post ) {
		return delete_post_meta( $post->ID, '_thumbnail_id' );
	}
	return false;
}