WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/edit post

Description

Update an existing post with values provided in $_POST. If you passed the post data in an argument, that argument is treated as an array of data keyed appropriately for turning into a post object. If post data is not passed, the $_POST object is used instead.

Usage

<?php edit_post($post_data); ?>

Default Usage

<?php edit_post($post_data); ?>

Parameters

$post_data
(object) (optional)
Default: null If not supplied, will apparently fallback to using the $_POST global variable

Return

(string) 
Post ID

Filter

Examples

Changelog

Source Code

edit_post() is located in wp-admin/includes/post.php.

Related

See also index of Function Reference and index of Template Tags.