Opened 16 years ago
Closed 15 years ago
#12768 closed defect (bug) (wontfix)
Store only relative path in theme_mod() for 'header_image' and 'background_image'
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.0 |
| Component: | Themes | Keywords: | |
| Focuses: | Cc: |
Description
In /wp-includes/theme.php it stores full paths for 'header_image' and 'background_image' in the theme mods in wp_options. Is there a reason why these can't be set to relative paths? Storing absolutely paths results in yet another path to have to fixup on deploy.
Change History (2)
Note: See
TracTickets for help on using
tickets.
I think the full path is necessary beause of the pretty permalink option. Imagine you are on same month archive and the link must work directly read out from options w/o any additional calculation. It's somewhat a concept in Wordpress to use absolute URLs instead of relative ones, so it's a constraint in using the software.
For deploy, you need to go through all (serialized) option values and replace the old URL with the new one. It's a PITA, yeah, there are some tools that deal with that.