Opened 13 months ago
Closed 13 months ago
#20556 closed defect (bug) (fixed)
Always include post-thumbnail-template and deprecate require_if_theme_supports()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.4 |
| Component: | Post Thumbnails | Version: | |
| Severity: | normal | Keywords: | 2nd-opinion |
| Cc: | joachim.kudish@… |
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)
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
- 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.
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]: