#21099 closed defect (bug) (fixed)
The 'allowed_themes' filter has disappeared
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.4.2 | Priority: | normal |
Severity: | normal | Version: | 3.4 |
Component: | Themes | Keywords: | has-patch |
Focuses: | Cc: |
Description
r20029 deprecated the get_allowed_themes()
function and replaced it with wp_get_themes( array( 'allowed' => true ) )
. This also removed the allowed_themes
filter.
- Is there a replacement filter?
- If not, can the
allowed_themes
filter be reinstated?
Attachments (3)
Change History (17)
#2
@
13 years ago
- Milestone changed from Awaiting Review to 3.4.2
Yeah, this should be added back to WP_Theme. Seems like WP_Theme::get_allowed() would make the most sense, as there was no filter in wpmu_get_blog_allowedthemes() or get_site_allowed_themes().
#4
follow-up:
↓ 6
@
13 years ago
In 3.3, only get_site_allowed_themes()
part was filtered:
http://core.trac.wordpress.org/browser/tags/3.3.3/wp-admin/includes/theme.php#L149
The patch assumes that it would make sense to filter the whole returned array.
#6
in reply to:
↑ 4
@
13 years ago
Replying to SergeyBiryukov:
The patch assumes that it would make sense to filter the whole returned array.
Not sure that's a good assumption. The filter only acts on a network-wide array, with no context for the blog_id being requested.
We should add in some new filters.
#7
@
13 years ago
21099.2.patch is another take.
allowed_themes
should mirror the 3.3 behaviour. site_allowed_themes
is a new filter, which passes $blog_id
for context.
#8
follow-up:
↓ 9
@
13 years ago
Wouldn't the 'site_allowed_themes' make more sense inside the get_allowed_on_site() method?
And just to add a little more context, the
allowed_themes
filter could previously be used to filter the themes shown on the Themes screen on sites within a network. This is no longer possible.