Make WordPress Core

Ticket #6963: media-doc-ready.patch

File media-doc-ready.patch, 886 bytes (added by azaozz, 17 years ago)
  • wp-admin/includes/media.php

     
    132132?>
    133133<script type="text/javascript">
    134134//<![CDATA[
    135 function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}
     135addLoadEvent = 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();}}};
    136136//]]>
    137137</script>
    138138<?php
     
    148148        $args = array_slice($args, 1);
    149149        call_user_func_array($content_func, $args);
    150150?>
     151<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
    151152</body>
    152153</html>
    153154<?php