Media: Add support for WebP images in the Thickbox library.
This ensures that `.webp` images are properly recognized and displayed in the modal as expected. Follow-up to [50810], [51227], [52073]. Props ilunabar, graham73may, sabernhardt, mukesh27, SergeyBiryukov. Fixes #55786. Built from https://develop.svn.wordpress.org/trunk@53451 git-svn-id: http://core.svn.wordpress.org/trunk@53040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d842b3b5c3
commit
9268ef9788
|
@ -76,10 +76,16 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
|
|||
baseURL = url;
|
||||
}
|
||||
|
||||
var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;
|
||||
var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$|\.webp$/;
|
||||
var urlType = baseURL.toLowerCase().match(urlString);
|
||||
|
||||
if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
|
||||
if(urlType == '.jpg' ||
|
||||
urlType == '.jpeg' ||
|
||||
urlType == '.png' ||
|
||||
urlType == '.gif' ||
|
||||
urlType == '.bmp' ||
|
||||
urlType == '.webp'
|
||||
){//code to show images
|
||||
|
||||
TB_PrevCaption = "";
|
||||
TB_PrevURL = "";
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.1-alpha-53450';
|
||||
$wp_version = '6.1-alpha-53451';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue