mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
JS init changes. fixes #2077
git-svn-id: http://svn.automattic.com/wordpress/trunk@3306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4a2287378d
commit
47889e8cea
@ -8,6 +8,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<?php check_for_pings(); ?>
|
<?php check_for_pings(); ?>
|
||||||
<?php do_action('admin_footer', ''); ?>
|
<?php do_action('admin_footer', ''); ?>
|
||||||
|
<script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -13,11 +13,11 @@ if (!isset($_GET["page"])) require_once('admin.php'); ?>
|
|||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
|
|
||||||
function addLoadEvent(func) {
|
function addLoadEvent(func) {
|
||||||
var oldonload = window.onload;
|
if ( typeof wpOnload != 'function' ) {
|
||||||
if (typeof window.onload != 'function') {
|
wpOnload = func;
|
||||||
window.onload = func;
|
|
||||||
} else {
|
} else {
|
||||||
window.onload = function() {
|
var oldonload = wpOnload;
|
||||||
|
wpOnload = function() {
|
||||||
oldonload();
|
oldonload();
|
||||||
func();
|
func();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user