Skip to:
Content

BuddyPress.org

Changeset 11105


Ignore:
Timestamp:
09/15/2016 08:19:52 PM (8 years ago)
Author:
djpaul
Message:

Core: stop loading deprecated code files for new installs from 2.7 onwards.

Existing installs will continue to load the deprecated code.

Fixes #6839

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-options.php

    r11094 r11105  
    101101        '_bp_force_buddybar'                   => false,
    102102
    103         /* Legacy theme *********************************************/
     103        /* Legacy *********************************************/
    104104
    105105        // Whether to register the bp-default themes directory.
    106106        '_bp_retain_bp_default'                => false,
     107
     108        // Whether to load deprecated code.
     109        '_bp_ignore_deprecated_code'           => true,
    107110
    108111        /* Widgets **************************************************/
  • trunk/src/bp-core/bp-core-update.php

    r11095 r11105  
    266266
    267267        // Version 2.7.0.
    268         if ( $raw_db_version < 11079 ) {
     268        if ( $raw_db_version < 11105 ) {
    269269            bp_update_to_2_7();
    270270        }
     
    511511 * - Add email unsubscribe salt.
    512512 * - Save legacy directory titles to the corresponding WP pages.
     513 * - Add ignore deprecated code option (false for updates).
    513514 *
    514515 * @since 2.7.0
     
    537538        }
    538539    }
     540
     541    // Load deprecated code for existing installs.
     542    bp_add_option( '_bp_ignore_deprecated_code', false );
    539543}
    540544
  • trunk/src/bp-loader.php

    r11084 r11105  
    309309        // Whether to refrain from loading deprecated functions
    310310        if ( ! defined( 'BP_IGNORE_DEPRECATED' ) ) {
    311             define( 'BP_IGNORE_DEPRECATED', false );
     311            define( 'BP_IGNORE_DEPRECATED', true );
    312312        }
    313313
     
    332332
    333333        $this->version    = '2.7-alpha';
    334         $this->db_version = 11084;
     334        $this->db_version = 11105;
    335335
    336336        /** Loading ***********************************************************/
    337337
    338338        /**
    339          * Filters the load_deprecated property value.
     339         * Whether to load deprecated code or not.
    340340         *
    341341         * @since 2.0.0
     342         * @since 2.7.0 Defaults to false (do not load deprecated code) for new installs.
    342343         *
    343344         * @const constant BP_IGNORE_DEPRECATED Whether or not to ignore deprecated functionality.
     
    510511
    511512        // Skip or load deprecated content
    512         if ( false !== $this->load_deprecated ) {
     513        if ( $this->load_deprecated || ! bp_get_option( '_bp_ignore_deprecated_code' ) ) {
    513514            require( $this->plugin_dir . 'bp-core/deprecated/1.2.php' );
    514515            require( $this->plugin_dir . 'bp-core/deprecated/1.5.php' );
Note: See TracChangeset for help on using the changeset viewer.