From a415951b8f85d53739e53525825af9b646078bf7 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 2 Apr 2023 13:01:23 +0000 Subject: [PATCH] Docs: Document default values for optional parameters in `wp_insert_attachment()`. This adds the missing mentions of default value for the `$file` and `$parent_post_id` parameters. Follow-up to [2921], [3092], [3303], [3851], [6155], [6379], [8669], [15590], [28788], [38408], [49936], [55021]. Props wpfy. Fixes #58043. Built from https://develop.svn.wordpress.org/trunk@55617 git-svn-id: http://core.svn.wordpress.org/trunk@55129 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index ba551fd99a14..c411dcc37112 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -6135,8 +6135,8 @@ function is_local_attachment( $url ) { * @see wp_insert_post() * * @param string|array $args Arguments for inserting an attachment. - * @param string|false $file Optional. Filename. - * @param int $parent_post_id Optional. Parent post ID. + * @param string|false $file Optional. Filename. Default false. + * @param int $parent_post_id Optional. Parent post ID. Default 0. * @param bool $wp_error Optional. Whether to return a WP_Error on failure. Default false. * @param bool $fire_after_hooks Optional. Whether to fire the after insert hooks. Default true. * @return int|WP_Error The attachment ID on success. The value 0 or WP_Error on failure. diff --git a/wp-includes/version.php b/wp-includes/version.php index 7aac7438219a..8f59d4d668fe 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55616'; +$wp_version = '6.3-alpha-55617'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.