Prevent media upload links from being clicked before lightbox is ready to handle them. fixes #15621
git-svn-id: http://svn.automattic.com/wordpress/branches/3.0@16646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3d0ffe642c
commit
9d18117a94
|
@ -379,7 +379,7 @@ function media_buttons() {
|
||||||
add_action( 'media_buttons', 'media_buttons' );
|
add_action( 'media_buttons', 'media_buttons' );
|
||||||
|
|
||||||
function _media_button($title, $icon, $type) {
|
function _media_button($title, $icon, $type) {
|
||||||
return "<a href='" . esc_url( get_upload_iframe_src($type) ) . "' id='add_$type' class='thickbox' title='$title'><img src='" . esc_url( admin_url( $icon ) ) . "' alt='$title' /></a>";
|
return "<a href='" . esc_url( get_upload_iframe_src($type) ) . "' id='add_$type' class='thickbox' title='$title'><img src='" . esc_url( admin_url( $icon ) ) . "' alt='$title' onclick='return false;' /></a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_upload_iframe_src($type) {
|
function get_upload_iframe_src($type) {
|
||||||
|
|
Loading…
Reference in New Issue