[wp-hackers] wp_enqueue_script() and URLs with 2+ parameters

Glenn Ansley glenn at glennansley.com
Fri Feb 27 19:50:11 GMT 2009


>wp_enqueue_script('my-custom-js',"$template_url/ js/ my-custom-js .js.php?p1=A&p2=B&p3=C",array('jquery'),'1.0');

Oh yeah... depending on where these query vars are coming from, it
might be wise to add some form of cleaning back to them in your filter
since you're now bypassing clean_url()

Glenn Ansley
WordPress Pluign Development
http://fullthrottledevelopment.com

On Fri, Feb 27, 2009 at 2:44 PM, Austin Matzko <if.website at gmail.com> wrote:
> On Fri, Feb 27, 2009 at 1:41 PM, Glenn Ansley <glenn at glennansley.com> wrote:
>>>To fix this in current WordPress, filter 'script_loader_src'
>> I believe this is too early. Whatever you output from
>> script_loader_src will still be cleaned by clean_url(). Correct? (i'm
>> not testing as i respond)
>
> You are correct.  My mistake.
> _______________________________________________
> 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