In `tb_show()` in `thickbox`, when loading content into `#TB_ajaxContent`, make sure a URL with no `?` doesn't break when `&random=` is appended to it.

Thickbox hasn't been updated since 2007, just FYI.

Fixes #31726.

Built from https://develop.svn.wordpress.org/trunk@32503


git-svn-id: http://core.svn.wordpress.org/trunk@32473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-05-13 21:42:24 +00:00
parent 2f82bbb60d
commit 1c0fa5f73a
2 changed files with 4 additions and 2 deletions

View File

@ -231,7 +231,9 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
jQuery("#TB_load").remove();
jQuery("#TB_window").css({'visibility':'visible'});
}else{
jQuery("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method
var load_url = url;
load_url += -1 === url.indexOf('?') ? '?' : '&';
jQuery("#TB_ajaxContent").load(load_url += "random=" + (new Date().getTime()),function(){//to do a post change this load method
tb_position();
jQuery("#TB_load").remove();
tb_init("#TB_ajaxContent a.thickbox");

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.3-alpha-32502';
$wp_version = '4.3-alpha-32503';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.