Core Function
View Source on Trac ↗ set_post_format()
set_post_format( mixed $post, mixed $format ) Assign a format to a post
Parameters 2 required
| Name / Type | Description |
|---|---|
| (int | | WP_Post) $post The post for which to assign a format. Required |
| $format string | A format to assign. Use an empty string or array to remove all formats from the post. Required |
Return Value
((array)
| WP_Error | false) Array of affected term IDs on success. WP_Error on error.
Function Information
Since Version
3.1.0
Source File
wp-includes/post-formats.php
Advertisement