Skip to content

Commit

Permalink
Docs: Document default values for optional parameters in `wp_insert_a…
Browse files Browse the repository at this point in the history
…ttachment()`.

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
  • Loading branch information
SergeyBiryukov committed Apr 2, 2023
1 parent df4ed40 commit a415951
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions wp-includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a415951

Please sign in to comment.