save_post()
public method
Save a post and it's meta
public save_post ( array $post_data, array $post_meta = null, boolean $strict = false, boolean $sanitized = false, array $fields = [] ) : mixed | void |
$post_data |
array |
All post data to be saved (using wp_insert_post / wp_update_post) |
$post_meta |
array |
(optional) All meta to be saved (set value to null to delete) |
$strict |
boolean |
(optional) Whether to delete previously saved meta not in $post_meta |
$sanitized |
boolean |
(optional) Will unsanitize the data, should be passed if the data is sanitized before sending. |
$fields |
array |
(optional) The array of fields and their options, for further processing with |
return |
mixed | void |
|