Opened 13 years ago
Closed 13 years ago
#20556 closed defect (bug) (fixed)
Always include post-thumbnail-template and deprecate require_if_theme_supports()
Reported by: | nacin | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Post Thumbnails | Keywords: | 2nd-opinion |
Focuses: | Cc: |
Description
require_if_theme_supports() was a nice idea at the time, but we've never found reason to leverage it. Let's remove it, and always include post-thumbnail-template.php.
As it is, some of these functions are useful when post thumbnails are not supported by the theme. (get_post_thumbnail_id(), for example). The whole file with these functions is under 100 lines.
Always including this file has the benefit of avoiding a sysopen call. opcode caching FTW. see #17112.
No plugins use require_if_theme_supports().
Attachments (1)
Change History (6)
#2
@
13 years ago
- Keywords 2nd-opinion added
- Resolution fixed deleted
- Status changed from closed to reopened
Wait, plugins might not use require_if_theme_supports(), but themes do.
It's useful if you allow child themes to disable certain features.
#3
@
13 years ago
I had searched themes.svn, but not very well. Looks like a few themes use it: https://www.google.com/search?q=require_if_theme_supports+site%3Athemes.svn.wordpress.org.
Happy with keeping it in theme.php.
In [20610]: