Opened 15 years ago
Closed 15 years ago
#846 closed defect (bug) (fixed)
not able to select member theme (WPMU 2.8.1)
Reported by: | DJPaul | Owned by: | |
---|---|---|---|
Milestone: | Priority: | major | |
Severity: | Version: | ||
Component: | Keywords: | ||
Cc: |
Description
In the BP admin page, we're not able to select the member theme when using WPMU 2.8.1. This is because the drop-down box returns a list of the /wp-content/themes/.
This is because get_themes() checks to see a cached version of the list of themes has already been generated, and uses it if it has. There is a cached version, because when the admin pages are loaded, get_themes() is called by add_action( 'admin_init', '_maybe_update_themes' ); in update.php.
_maybe_update_themes() has changed since WPMU 2.7.1 as it uses get_transient() rather than get_option(). get_option() itself has been changed in WPMU 2.8.1, so swapping the function call back doesn't work.
get_themes() has not changed in WPMU 2.8.1.
Suggestion: let member themes live in /wp-content/themes/. Add a criteria to the member themes' style.css (e.g. "BuddyPress Theme: Yes"). get_themes() returns all themes in the themes directory, not just those themes which have been enabled by the site admin - so BP Member themes would not need enabling, so they won't be selectable by Joe Noob on a hosted blog.
Clarification: add_action( 'admin_init', '_maybe_update_themes' ); is also present in WPMU 2.7.1. The only thing that jjj and I could find different was the get_option/get_transient thing.