Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#34182 closed defect (bug) (fixed)

'allowedthemes' network option never gets primed when themes are deleted

Reported by: drewapicture's profile DrewAPicture Owned by: jeremyfelt's profile jeremyfelt
Milestone: 4.6 Priority: normal
Severity: normal Version: 3.0
Component: Themes Keywords: has-patch
Focuses: multisite Cc:

Description (last modified by DrewAPicture)

It appears that the 'allowedthemes' network option is channeling Rick Astley in that it never gives up or lets down, or runs around and deserts the themes it stores.

In my testing, it would seem that all themes ever installed are stored in perpetuity. It's possible this behavior has been around since WP_Theme was written in 3.4.

For example: I ran across this bug when testing something unrelated, and noticed that 'allowedthemes' contained 303 total keys (I have ~10 themes on my test build currently).

Attachments (1)

34182.diff (476 bytes) - added by jeremyfelt 9 years ago.

Download all attachments as: .zip

Change History (9)

#1 @DrewAPicture
9 years ago

  • Description modified (diff)

#2 @DrewAPicture
9 years ago

  • Description modified (diff)

#3 @DrewAPicture
9 years ago

  • Milestone changed from 4.4 to Future Release

Needs a patch first, this one's been around for a while anyway.

@jeremyfelt
9 years ago

#4 @jeremyfelt
9 years ago

Once #30594 is in, we'll have WP_Network::network_disable_theme() available to us. 34182.diff implements this in delete_theme().

Unit tests on this might be tough. We don't have anything covering delete_themes() at the moment.

#5 @jeremyfelt
9 years ago

  • Keywords has-patch added; needs-patch needs-unit-tests removed
  • Milestone changed from Future Release to 4.6
  • Owner set to jeremyfelt
  • Status changed from new to accepted

#6 @jeremyfelt
9 years ago

  • Version set to 3.0

#7 @jeremyfelt
9 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 37203:

Multisite: Remove theme from network allowed themes when deleted

Previously, a deleted theme would remain in the list of allowed themes until manually cleared. This uses WP_Theme::network_disable_theme(), added in [37202].

Fixes #34182.

This ticket was mentioned in Slack in #core-multisite by drew. View the logs.


9 years ago

Note: See TracTickets for help on using tickets.