Skip to:
Content

Opened 5 months ago

Closed 5 months ago

Last modified 3 months ago

#5223 closed enhancement (fixed)

Stop offering bp-default on new installations

Reported by: boonebgorges Owned by: boonebgorges
Milestone: 1.9 Priority: normal
Severity: normal Version:
Component: Theme Keywords: has-patch needs-testing 2nd-opinion
Cc: mercijavier@…

Description

As of 1.9, we should no longer offer bp-default as an installable theme for new installations. This will be the first step in the longer-term task of removing bp-default from the BP codebase, and spinning it out into its own theme. See #5212 for more general discussion.

My proposed solution is to bail out of registering the bp-themes theme directory unless one of the following cases obtains:

  1. The current theme is bp-default (get_stylesheet())
  2. The current theme is a child of bp-default (get_template())

If anyone thinks that this is too aggressive, we could do the above *only for new installations*. How can we tell what's a new installation? We could add something to the 1.9 upgrade routine that sets a flag in the database - something like bp_register_bp_default - to true, while that value would be set to false (or unset) for new installs.

Patch incoming for the simpler, more aggressive option.

Attachments (1)

5223.patch (1.2 KB) - added by boonebgorges 5 months ago.

Download all attachments as: .zip

Change History (8)

boonebgorges5 months ago

comment:1 boonebgorges5 months ago

  • Keywords has-patch needs-testing 2nd-opinion added

See 5223.patch. (Sorry for the crummy function naming - better suggestions welcome.)

comment:2 DJPaul5 months ago

One edge case not handled is if BP-Default is active on some site in the network (in multisite).

comment:3 mercime5 months ago

  • Cc mercijavier@… added

comment:4 boonebgorges5 months ago

One edge case not handled is if BP-Default is active on some site in the network (in multisite).

Thinking about this, and I'm not sure it's much of a problem. The theme directory *would* be registered on sites that are running bp-default, while it would *not* be registered elsewhere. I'll have to run some tests, but it seems like it should just work.

comment:5 follow-up: boonebgorges5 months ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 7569:

Sound the knell for the BuddyPress Default theme

bp-default is being sunsetted as of BP 1.9. The theme will continue to receive
security updates and other critical fixes, but will otherwise no longer be
under active development by the core team.

We maintain backward compatibility with sites currently using bp-default by
continuing to register the bp-themes theme directory when bp-default, or a
child theme thereof, is in use on a given site. Those sites will continue to
be able to use the theme. Installations where bp-default is not already in use
will no longer see it listed on Dashboard > Appearance.

Site administrators or developers who want to override this behavior may do so
with the 'bp_do_register_theme_directory' filter. Please note that bp-themes
will be removed altogether from BuddyPress in a future version, likely migrated
to wordpress.org/extend. See #5212.

Now cracks a noble heart. Good-night, sweet prince;
And flights of angels sing thee to thy rest.

Fixes #5223

comment:6 in reply to: ↑ 5 ericlewis3 months ago

Replying to boonebgorges:

Installations where bp-default is not already in use will no longer see it listed on Dashboard > Appearance.

I just had a case where a client switched away from a theme based on bp-default, couldn't switch back and went into a frenzy.

Not sure if this is a serious issue or not, just some feedback.

comment:7 boonebgorges3 months ago

ericlewis - Thanks for the feedback. I saw a number of reports of this very issue just over the weekend. I think it was an error in (my) judgment for us not to account for this kind of situation. I've opened a new ticket at #5325; feedback welcome.

Note: See TracTickets for help on using tickets.