[wp-hackers] wp_enqueue_script does not load admin-forms in plugin page

Glenn Ansley glenn at glennansley.com
Tue Sep 2 17:00:52 GMT 2008


FYI: I noticed there is a thread going on for this at the forums as well: <
http://wordpress.org/support/topic/200944?replies=2>

On Tue, Sep 2, 2008 at 12:58 PM, Jason Webster <jason at intraffic.net> wrote:

> 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
>>
>>
>
> _______________________________________________
> 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