Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

wp_update_post()

3 tags 1 category

wp_update_post() — Updates a post with new post data. The date does not have to be set for drafts. You can set the date and it will not be overridden.

Inputs: $postarr (array|object): Optional. Post data. Arrays are expected to be escaped, objects are not. See wp_insert_post() for accepted arguments. Default array. $wp_error (bool): Optional. Whether to return a WP_Error on failure. Default false. $fire_after_hooks (bool): Optional. Whether to fire the after insert hooks. Default true.

Returns int|WP_Error: The post ID on success. The value 0 or WP_Error on failure.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…