From ea352ee2ab2f3e10445263d5e6b811c106d14413 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 21 Jul 2020 12:47:58 +0000 Subject: [PATCH] Docs: Improve description for `edit_post()`. Props stevenlinx. Fixes #50713. git-svn-id: https://develop.svn.wordpress.org/trunk@48529 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/post.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php index 907f92b46a..9e63b17c92 100644 --- a/src/wp-admin/includes/post.php +++ b/src/wp-admin/includes/post.php @@ -224,11 +224,16 @@ function _wp_get_allowed_postdata( $post_data = null ) { /** * Update an existing post with values provided in $_POST. * + * If post data is passed as an argument, it is treated as an array of data + * keyed appropriately for turning into a post object. + * + * If post data is not passed, the $_POST global variable is used instead. + * * @since 1.5.0 * * @global wpdb $wpdb WordPress database abstraction object. * - * @param array $post_data Optional. + * @param array $post_data Optional. Defaults to the $_POST global. * @return int Post ID. */ function edit_post( $post_data = null ) {