[wp-trac] [WordPress Trac] #31785: admin_footer
WordPress Trac
noreply at wordpress.org
Fri Mar 27 17:48:22 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):
here you go
{{{
function my_custom_js() {
if (!is_curent_plugin()) {
return;
}
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(){
dojo.addClass(document.body, "tundra");
});
//--></script>
';
}
add_action('admin_footer', 'my_custom_js', 100)
}}}
;
When I am calling my_custom_js directly from wp-includs/admin-footer.php
javascript is working, but this is just hack, I want to have proper
solution.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31785#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list