From bbbb94930748a48db03c231ca9b7c557ce35a653 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Sat, 17 Dec 2022 23:05:38 +0000 Subject: [PATCH] Docs: Update docs for `image_sideload_extensions` filter to include `webp` in the list of allowed extensions. Follow-up to [50810]. Props dimadin. Fixes #57346. See #56792. git-svn-id: https://develop.svn.wordpress.org/trunk@55002 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/media.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index c479ddc851..0938257da7 100644 --- a/src/wp-admin/includes/media.php +++ b/src/wp-admin/includes/media.php @@ -993,6 +993,7 @@ function wp_media_upload_handler() { * @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. + * @since 5.8.0 Added 'webp' to the default list of allowed file extensions. * * @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. @@ -1017,8 +1018,10 @@ function media_sideload_image( $file, $post_id = 0, $desc = null, $return_type = * - `jpe` * - `png` * - `gif` + * - `webp` * * @since 5.6.0 + * @since 5.8.0 Added 'webp' to the default list of allowed file extensions. * * @param string[] $allowed_extensions Array of allowed file extensions. * @param string $file The URL of the image to download.