#10759 closed defect (bug) (invalid)
Bug: wp_register_style does not allow stylesheets with parameters
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.8.4 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
Sometimes its useful to use PHP to generate stylesheets. Unfortunately, it's not possible to pass parameters to the stylesheets because wp_register_style gets confused. For example:
wp_register_style('sb_style', get_option('siteurl').'?sermon-browser-style', false, $version);
generates
http://domain.com?sb_style&ver=1252494619
rather than
http://domain.com?sb_style&ver=1252494619
The bug is presumably in WP_Styles
Change History (3)
#1
@
14 years ago
- Keywords WP_Styles wp_register_style parameters removed
- Milestone 2.9 deleted
- Resolution set to invalid
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
This is not a bug, but the way that the function is intended to work. The & character by itself is an illegal entity in XHTML. So & is normally replaced with & however & is a correct html entity for the &.
This was discussed several months ago on the wp-hackers list in this thread: http://lists.automattic.com/pipermail/wp-hackers/2009-February/thread.html#25046
In short it was proven that the function is acting as expected and there are no bad side effects from the way that it does things. The thread actually refers to wp_enqueue_script but it is the same principal in the end.