[wp-hackers] wp_enqueue_script does not load admin-forms in plugin
page
Jason Webster
jason at intraffic.net
Tue Sep 2 16:58:27 GMT 2008
Yes. You have to run wp_enqueue_script() from an action that fires
before the scripts are printed in the head.
Right now, you're attempting to queue the script from about midway
through the content pane being rendered.
Malaiac wrote:
> I guess the support forum won't be of any help here
> ( http://wordpress.org/support/topic/200944?replies=1 )
>
> I have a plugin page ...
> /wp-admin/admin.php?page=plugin.php
>
> in plugin.php :
> $title = __('My plugin page','plugin');
> $parent_file = 'plugin.php';
> wp_enqueue_script('admin-forms');
> require_once('admin-header.php');
>
> And still got no forms.js loading in the header...
> should be this one, like in edit.php :
> <script type='text/javascript'
> src='http://www.mydomain.com/wp-admin/js/forms.js?ver=20080401'></script>
>
> anyone got a clue why ?
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list