Clarify and complete default argument documentation for `wp_insert_post()`.

Props atimmer, SergeyBiryukov.
Fixes #31359.

Built from https://develop.svn.wordpress.org/trunk@31486


git-svn-id: http://core.svn.wordpress.org/trunk@31467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2015-02-22 00:56:29 +00:00
parent 0fa4845eec
commit 1ffca1fcb6
2 changed files with 26 additions and 13 deletions

View File

@ -3057,22 +3057,35 @@ function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
* *
* @type int $ID The post ID. If equal to something other than 0, * @type int $ID The post ID. If equal to something other than 0,
* the post with that ID will be updated. Default 0. * the post with that ID will be updated. Default 0.
* @type string $post_status The post status. Default 'draft'.
* @type string $post_type The post type. Default 'post'.
* @type int $post_author The ID of the user who added the post. Default is * @type int $post_author The ID of the user who added the post. Default is
* the current user ID. * the current user ID.
* @type bool $ping_status Whether the post can accept pings. Default is the * @type string $post_date The date of the post. Default is the current time.
* value of 'default_ping_status' option. * @type string $post_date_gmt The date of the post in the GMT timezone. Default is
* @type int $post_parent Set this for the post it belongs to, if any. Default 0. * the value of `$post_date`.
* @type int $menu_order The order it is displayed. Default 0. * @type mixed $post_content The post content. Default empty.
* @type string $post_content_filtered The filtered post content. Default empty.
* @type string $post_title The post title. Default empty.
* @type string $post_excerpt The post excerpt. Default empty.
* @type string $post_status The post status. Default 'draft'.
* @type string $post_type The post type. Default 'post'.
* @type string $comment_status Whether the post can accept comments. Accepts 'open' or 'closed'.
* Default is the value of 'default_comment_status' option.
* @type string $ping_status Whether the post can accept pings. Accepts 'open' or 'closed'.
* Default is the value of 'default_ping_status' option.
* @type string $post_password The password to access the post. Default empty.
* @type string $post_name The post name. Default is the sanitized post title.
* @type string $to_ping Space or carriage return-separated list of URLs to ping. * @type string $to_ping Space or carriage return-separated list of URLs to ping.
* Default empty string. * Default empty.
* @type string $pinged Space or carriage return-separated list of URLs that have * @type string $pinged Space or carriage return-separated list of URLs that have
* been pinged. Default empty string. * been pinged. Default empty.
* @type string $post_password The password to access the post. Default empty string. * @type string $post_modified The date when the post was last modified. Default is
* @type string $guid' Global Unique ID for referencing the post. * the current time.
* @type string $post_content_filtered The filtered post content. Default empty string. * @type string $post_modified_gmt The date when the post was last modified in the GMT
* @type string $post_excerpt The post excerpt. Default empty string. * timezone. Default is the current time.
* @type int $post_parent Set this for the post it belongs to, if any. Default 0.
* @type int $menu_order The order the post should be displayed in. Default 0.
* @type string $post_mime_type The mime type of the post. Default empty.
* @type string $guid' Global Unique ID for referencing the post. Default empty.
* } * }
* @param bool $wp_error Optional. Whether to allow return of WP_Error on failure. Default false. * @param bool $wp_error Optional. Whether to allow return of WP_Error on failure. Default false.
* @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure. * @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure.

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.2-alpha-31485'; $wp_version = '4.2-alpha-31486';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.