Skip to:
Content

BuddyPress.org

Changeset 8158


Ignore:
Timestamp:
03/25/2014 06:40:56 PM (11 years ago)
Author:
boonebgorges
Message:

Don't register the bp-themes themes directory if bp-default is found elsewhere in the installation

This will be part of the migration path away from the packaged version of
bp-default. bp-default will be added to the wordpress.org theme repository with
a higher version number, prompting an upgrade that will result in an
installation into the standard WP themes directory. Once that happens, most
installations will no longer be reliant on the version of bp-default packaged
with BuddyPress.

See #5212

Props DJPaul

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-functions.php

    r7952 r8158  
    606606 */
    607607function bp_do_register_theme_directory() {
     608    // If bp-default exists in another theme directory, bail.
     609    // This ensures that the version of bp-default in the regular themes
     610    // directory will always take precedence, as part of a migration away
     611    // from the version packaged with BuddyPress
     612    foreach ( array_values( (array) $GLOBALS['wp_theme_directories'] ) as $directory ) {
     613        if ( is_dir( $directory . '/bp-default' ) ) {
     614            return false;
     615        }
     616    }
     617
     618    // If the current theme is bp-default (or a bp-default child), BP
     619    // should register its directory
    608620    $register = 'bp-default' === get_stylesheet() || 'bp-default' === get_template();
    609621
Note: See TracChangeset for help on using the changeset viewer.