[wp-trac] [WordPress Trac] #31785: admin_footer

WordPress Trac noreply at wordpress.org
Sat Mar 28 01:59:48 UTC 2015


#31785: admin_footer
----------------------------+------------------------------
 Reporter:  Mikayel         |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Administration  |     Version:  4.1.1
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------------------

Comment (by Mikayel):

 Replying to [comment:9 MattyRob]:
 > The following in an active plugin file produced the same "HERE" alert
 for me. Can you disable all other plugins and use a core theme. Does that
 work any better?
 > {{{
 > function my_custom_js() {
 > echo  '<script
 src="//ajax.googleapis.com/ajax/libs/dojo/1.8.0/dojo/dojo.js" data-dojo-
 config="parseOnLoad: true"></script>';
 >
 > echo '<script type="text/javascript">
 > <!--
 >       dojo.require("dojox.validate");
 >       dojo.require("dojox.validate.web");
 >       dojo.require("dojox.validate.us");
 >       dojo.require("dojox.validate.check");
 >       dojo.require("dijit.form.TextBox");
 >       dojo.require("dijit.form.ValidationTextBox");
 >       dojo.require("dijit.form.NumberTextBox");
 >       dojo.require("dijit.form.ComboBox");
 >       dojo.require("dijit.form.DateTextBox");
 >       dojo.require("dijit.dijit");
 >       dojo.require("dojo.parser");
 >
 >       dojo.addOnLoad(function(){
 >               alert( "HERE" );
 >               dojo.addClass( "wpwrap", "tundra");
 >       });
 > //--></script>';
 > }
 > add_action('admin_footer', 'my_custom_js', 100);
 > }}}

 Please find attached hellodojo.php plugin, when you install plugin and
 open the dashboard tab (/wp-admin/index.php), you can see errors in
 console.

 I need to place my code after wpOnload(), and everything will be OK.
 {{{
 <script type="text/javascript">if(typeof
 wpOnload=='function')wpOnload();</script>
 </body>
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31785#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list