[wp-hackers] wp_enqueue_script() and URLs with 2+ parameters
mikeschinkel at newclarity.net
Fri Feb 27 18:36:30 GMT 2009
I'm running into a quandry and am wondering if you have suggestions.
To start my PHP file sets the HTTP content type using:
In(directly with)in my functions.php file in my theme I'm using wp_enqueue_script() something like this:
wp_enqueue_script('my-custom-js',"$template_url/ js/ my-custom-js .js.php?p1=A&p2=B&p3=C",array('jquery'),'1.0');
The problem is that WordPress sends the first URL that follows to the browser instead of the second URL which is what I need:
My question is: "Is this really by design, or an oversight in the design?"
I've tried to figure out how to solve this via a hook but the code is very complex and nested and I can't figure out how to hook it easily enough given my deadline today.
So in summary my questions are:
1.) Is this encoding of the ampersand in the URL from "&" to "#038;" by design, or is it a bug we can fix in core?
2.) No matter the answer to #1, is there a hook that would allow a plugin to bypass this encoding?
Thanks in advance.
More information about the wp-hackers