#32371 closed defect (bug) (duplicate)
allowed_themes filter not consistent on multisite network
| Reported by: | fliespl | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Themes | Version: | |
| Severity: | normal | Keywords: | reporter-feedback |
| Cc: | Focuses: | multisite |
Description
Using allowed_themes filter allows only to set themes which are displayed for choosing.
Unfortunately if we add single exclusive theme for just one blog - user can't use it.
This is due to check in "is_allowed" method of WP_Theme class. It doesn't involve allowed_themes filter and fails with "Cheating, huh?" warning.
Steps to reproduce:
- Use filter to add exclusive blog:
add_filter('allowed_themes', function($tpls) { if(logic) { $tpls['exclusive_theme'] = true; } return $tpls; }
- Try to enable it through themes menu.
Expected result: theme is changed
What happens instead: "Cheating, huh?" warning is displayd.
Possible fix included.
Attachments (1)
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi @fliespl, thanks for the ticket.
I believe this is a duplicate of #28436, as the changes there should correct this. Can you take a look and confirm?