Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 8 years ago

#3108 closed enhancement (wontfix)

allow themes to customize BuddyPress before it loads

Reported by: ptahdunbar's profile ptahdunbar Owned by:
Milestone: Priority: normal
Severity: normal Version: 1.5
Component: Core Keywords: close
Cc:

Description

BuddyPress allows you to customize various aspects of the plugin and other custom BP components by bp-custom.php within the WP_CONTENT_DIR directory.

I suggest adding additional logic for BP to check within the active theme's directory for bp-custom.php too, to make customizations on a theme-by-theme basis easier.

Attachments (2)

ticket.3108.diff (1.0 KB) - added by ptahdunbar 13 years ago.
ticket.3108.2.diff (1.2 KB) - added by ptahdunbar 13 years ago.

Download all attachments as: .zip

Change History (13)

#1 @ptahdunbar
13 years ago

s/WP_CONTENT_DIR/WP_CONTENT_DIR/plugins/

ticket.3108.diff does the job.

#2 follow-up: @wpmuguru
13 years ago

The problem with this is that plugins can change what the current parent/child theme are. A plugin which does that might load either before or after BuddyPress which would produce unpredictable results.

#3 in reply to: ↑ 2 ; follow-up: @sbrajesh
13 years ago

Replying to wpmuguru:

The problem with this is that plugins can change what the current parent/child theme are. A plugin which does that might load either before or after BuddyPress which would produce unpredictable results.

if you mean modifying the current theme directory for the site, then can't we consider that as the edge case? As on most of the sites, a site admin usually does not use a plugin which modifies the current theme(may be I am overlooking a few plugins like the mobile one), rather we expect them to activate the theme of their choice.

#4 in reply to: ↑ 3 @wpmuguru
13 years ago

Replying to sbrajesh:

if you mean modifying the current theme directory for the site, then can't we consider that as the edge case?

Not the directory, filtering the stylesheet (and/or template) option. Mobile support is an instance where that is done. A second thing to keep in mind is that in a WP network, that code runs on all the sub sites as well as the BP blog. I've used a plugin to switch sub sites away from a specific theme to alternate one on several occasions.

#5 @ptahdunbar
13 years ago

  • Summary changed from allow bp-custom.php to exists in the active theme's directory to allow themes to customize BuddyPress before it loads

#6 @DJPaul
13 years ago

  • Keywords dev-feedback added

#7 @DJPaul
13 years ago

  • Milestone changed from Awaiting Review to Future Release

#8 @DJPaul
11 years ago

  • Keywords needs-refresh added; has-patch dev-feedback removed
  • Severity set to normal

#9 @boonebgorges
10 years ago

Revisiting this ticket (3 years later!) I think it's not the worst idea, but I do want to sort out the ramifications of the edge case that wpmuguru raises above. ticket.3108.2.diff should address many of the cases of forced-theme-changes. That's because it uses the get_stylesheet_directory() and _template_ functions, both of which are built from data that is passed through a number of the filters that would logically be used for this kind of theme-switching technique.

What do others think? Is this worth pursuing? Are there remaining edge cases that have not been addressed?

#10 @r-a-y
8 years ago

  • Keywords close added; needs-refresh removed

If a theme needs this functionality, they can add it themselves in their own theme's functions.php file:

function my_after_theme_setup_bp_mods() {
    if ( ! function_exists( 'buddypress' ) ) {
        return;
    }
    require dirname( __FILE__ ) . '/functions-buddypress.php';
}
add_action( 'after_setup_theme', 'my_after_theme_setup_bp_mods' );

Themes that include some form of BuddyPress functionality are probably already doing some form of BP check anyway.

Last edited 8 years ago by r-a-y (previous) (diff)

#11 @DJPaul
8 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.