diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 093ee69360..b0c00e847b 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -974,21 +974,21 @@ function wp_media_upload_handler() { * Downloads an image from the specified URL, saves it as an attachment, and optionally attaches it to a post. * * @since 2.6.0 - * @since 4.2.0 Introduced the `$return` parameter. - * @since 4.8.0 Introduced the 'id' option for the `$return` parameter. + * @since 4.2.0 Introduced the `$return_type` parameter. + * @since 4.8.0 Introduced the 'id' option for the `$return_type` parameter. * @since 5.3.0 The `$post_id` parameter was made optional. * @since 5.4.0 The original URL of the attachment is stored in the `_source_url` * post meta value. * - * @param string $file The URL of the image to download. - * @param int $post_id Optional. The post ID the media is to be associated with. - * @param string $desc Optional. Description of the image. - * @param string $return Optional. Accepts 'html' (image tag html) or 'src' (URL), - * or 'id' (attachment ID). Default 'html'. + * @param string $file The URL of the image to download. + * @param int $post_id Optional. The post ID the media is to be associated with. + * @param string $desc Optional. Description of the image. + * @param string $return_type Optional. Accepts 'html' (image tag html) or 'src' (URL), + * or 'id' (attachment ID). Default 'html'. * @return string|int|WP_Error Populated HTML img tag, attachment ID, or attachment source * on success, WP_Error object otherwise. */ -function media_sideload_image( $file, $post_id = 0, $desc = null, $return = 'html' ) { +function media_sideload_image( $file, $post_id = 0, $desc = null, $return_type = 'html' ) { if ( ! empty( $file ) ) { $allowed_extensions = array( 'jpg', 'jpeg', 'jpe', 'png', 'gif', 'webp' ); @@ -1043,7 +1043,7 @@ function media_sideload_image( $file, $post_id = 0, $desc = null, $return = 'htm add_post_meta( $id, '_source_url', $file ); // If attachment ID was requested, return it. - if ( 'id' === $return ) { + if ( 'id' === $return_type ) { return $id; } @@ -1052,7 +1052,7 @@ function media_sideload_image( $file, $post_id = 0, $desc = null, $return = 'htm // Finally, check to make sure the file has been saved, then return the HTML. if ( ! empty( $src ) ) { - if ( 'src' === $return ) { + if ( 'src' === $return_type ) { return $src; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 78e0d89198..487d1112a7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-beta1-53191'; +$wp_version = '6.0-beta1-53192'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.