Skip to:
Content

BuddyPress.org

Ticket #5325: 5325.patch

File 5325.patch, 2.6 KB (added by boonebgorges, 11 years ago)
  • bp-core/bp-core-functions.php

    diff --git bp-core/bp-core-functions.php bp-core/bp-core-functions.php
    index acb8d56..06616c8 100644
    function bp_core_add_illegal_names() { 
    597597 */
    598598function bp_do_register_theme_directory() {
    599599        $register = 'bp-default' === get_stylesheet() || 'bp-default' === get_template();
     600
     601        // Legacy sites continue to have the theme registered
     602        if ( ! $register && 1 == get_site_option( '_bp_retain_bp_default' ) ) {
     603                $register = true;
     604        }
     605
    600606        return apply_filters( 'bp_do_register_theme_directory', $register );
    601607}
    602608
  • bp-core/bp-core-update.php

    diff --git bp-core/bp-core-update.php bp-core/bp-core-update.php
    index ce9b91c..ed9310c 100644
    function bp_version_updater() { 
    225225                if ( $raw_db_version < 7553 ) {
    226226                        bp_update_to_1_9();
    227227                }
     228
     229                // 1.9.2
     230                if ( $raw_db_version < 7731 ) {
     231                        bp_update_to_1_9_2();
     232                }
    228233        }
    229234
    230235        /** All done! *************************************************************/
    function bp_update_to_1_9() { 
    301306}
    302307
    303308/**
     309 * Perform database updates for BP 1.9.2
     310 *
     311 * In 1.9, BuddyPress stopped registering its theme directory when it detected
     312 * that bp-default (or a child theme) was not currently being used, in effect
     313 * deprecating bp-default. However, this ended up causing problems when site
     314 * admins using bp-default would switch away from the theme temporarily:
     315 * bp-default would no longer be available, with no obvious way (outside of
     316 * a manual filter) to restore it. In 1.9.2, we add an option that flags
     317 * whether bp-default or a child theme is active at the time of upgrade; if so,
     318 * the theme directory will continue to be registered even if the theme is
     319 * deactivated temporarily. Thus, new installations will not see bp-default,
     320 * but legacy installations using the theme will continue to see it.
     321 *
     322 * @since BuddyPress (1.9.2)
     323 */
     324function bp_update_to_1_9_2() {
     325        if ( 'bp-default' === get_stylesheet() || 'bp-default' === get_template() ) {
     326                update_site_option( '_bp_retain_bp_default', 1 );
     327        }
     328}
     329
     330/**
    304331 * Redirect user to BP's What's New page on first page load after activation.
    305332 *
    306333 * @since BuddyPress (1.7.0)
  • bp-loader.php

    diff --git bp-loader.php bp-loader.php
    index e795d80..ca43499 100644
    class BuddyPress { 
    298298                /** Versions **********************************************************/
    299299
    300300                $this->version    = '1.9-7682';
    301                 $this->db_version = 7553;
     301                $this->db_version = 7731;
    302302
    303303                /** Loading ***********************************************************/
    304304