Ticket #6963: media-doc-ready.patch
File media-doc-ready.patch, 886 bytes (added by , 17 years ago) |
---|
-
wp-admin/includes/media.php
132 132 ?> 133 133 <script type="text/javascript"> 134 134 //<![CDATA[ 135 function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}} 135 addLoadEvent = function(func) {if (typeof jQuery != "undefined") jQuery(document).ready(func); else if (typeof wpOnload!='function'){wpOnload=func;} else {var oldonload=wpOnload; wpOnload=function(){oldonload();func();}}}; 136 136 //]]> 137 137 </script> 138 138 <?php … … 148 148 $args = array_slice($args, 1); 149 149 call_user_func_array($content_func, $args); 150 150 ?> 151 <script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script> 151 152 </body> 152 153 </html> 153 154 <?php