Skip to:
Content

Ignore:
Timestamp:
10/22/12 05:24:36 (18 months ago)
Author:
johnjamesjacoby
Message:

Theme Compat:

  • Put back 'bp_register_theme_directory' sub action, hooked to 'bp_loaded'
  • Move register_theme_directory() back into BuddyPress root class method.
  • Introduces old_themes_dir variable, which will get deprecated when we remove bp-default from core.
  • Create 'bp-templates' root folder, for theme-compat templates to live in, and not conflict with 'bp-themes'.
  • Fixes issue where 'bp-legacy' would show up as "Broken" in Appearance > Themes.
  • Brute-force switch from bp-default to WP_DEFAULT_THEME on deactivation, and update theme roots, to fix issue when deactivating BuddyPress while theme stack relies on bp-default.
  • See #3741
File:
1 edited

Legend:

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

    r6301 r6436  
    181181    delete_site_transient( 'theme_roots' ); 
    182182 
     183    // Switch to WordPress's default theme if current parent or child theme 
     184    // depend on bp-default. This is to prevent white screens of doom. 
     185    if ( in_array( 'bp-default', array( get_template(), get_stylesheet() ) ) ) { 
     186        switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME ); 
     187        update_option( 'template_root',   get_raw_theme_root( WP_DEFAULT_THEME, true ) ); 
     188        update_option( 'stylesheet_root', get_raw_theme_root( WP_DEFAULT_THEME, true ) ); 
     189    } 
     190 
    183191    // Use as of (1.6) 
    184192    do_action( 'bp_deactivation' ); 
Note: See TracChangeset for help on using the changeset viewer.