wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



delete_post_thumbnail › WordPress Function

Od3.3.0
Przestarzałyn/a
delete_post_thumbnail ( $post )
Parametry:
  • (int|WP_Post) $post Post ID or post object from which the thumbnail should be removed.
    Wymagane: Tak
Powrót:
  • (bool) True on success, false on failure.
Zdefiniowane na:
Codex:

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



Źródło

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