Opened 11 years ago
Closed 11 years ago
#26644 closed defect (bug) (worksforme)
Theme screenshots in admin relative to Site Address (URL)
Reported by: | diegogb | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.8 |
Component: | Themes | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
The theme screenshots in Appeareance -> themes are relative to eith r the WP Address or the Site Address (URL). This is breaking the images when the Site Address (URL) is not a public URL.
Example of broken link:
http://localhost/wp-content/themes/twentyeleven/screenshot.png
Attachments (2)
Change History (7)
#2
@
11 years ago
It was working ok with 3.7.1, we were using WordPress HTTPS plugin with URL filters set to / maybe is something that is not updated in the Wordpres HTTPS plugin? If so, we can open a bug there. But it is strange that is taking the screenshot from the WP Address instead of the relative path...
#4
@
11 years ago
- Keywords reporter-feedback added
@diegogb The default usage of get_screenshot()
is to use the absolute URI of the screenshot.ext
file that is returned by get_stylesheet_directory_uri()
. It's called with the 'relative'
parameter in two places in class-wp-theme.php
: Line 343 and Line 425, but other than that it should be pulling from whatever is eventually returned by get_theme_root_uri()
. Even that is filtered to siteurl
, though, which eventually boils down to the "WordPress Address (URL)" setting in admin.
Since core only calls for the relative path in those two places, I'm going to venture a guess that your plugin is filtering out that URL somewhere. I suggest checking on a clean install of the plugin (use define('WPHTTPS_RESET', true);
in the plugin itself) and see how that works for you.
WP_Theme::get_screenshot()
usage has not changed, so doesn't appear to be a regression.