WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#12768 closed defect (bug) (wontfix)

Store only relative path in theme_mod() for 'header_image' and 'background_image'

Reported by: mikeschinkel 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)

#1 @hakre
10 years ago

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.

#2 @nacin
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

per hakre's comments.

Note: See TracTickets for help on using tickets.