Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/26/2022 01:31:07 PM (2 years ago)
Author:
imath
Message:

Start using a new strategy about deprecated functions management

The main goal of this commit is to change the way we load the files containing deprecated functions. This files are located into the src/bp-core/deprecated/ directory and there's one file for each version of BuddyPress we created to store the deprecate functions.

We noticed that these files were not necessarily loaded although they should have. This case happens to all users who firstly installed BuddyPress when its version was upper than 2.7.

From now on, here's how deprecated code will eventually load into your BuddyPress installation:

  • First installs won't load deprecated code.
  • Updated installs will load the 2 latest BuddyPress versions deprecated code.
  • Defining the BP_IGNORE_DEPRECATED constant to true will change the 2 above points behavior ignoring any BuddyPress versions deprecated code.
  • Defining the BP_IGNORE_DEPRECATED constant to false will change the 2 first points behavior loading all BuddyPress versions deprecated code.

Props djpaul, dcavins.

Fixes #8687

File:
1 edited

Legend:

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

    r13273 r13304  
    206206    // Install BP schema and activate only Activity and XProfile.
    207207    if ( bp_is_install() ) {
     208        // Set the first BP major version the plugin was installed.
     209        bp_update_option( '_bp_initial_major_version', bp_get_major_version() );
    208210
    209211        // Apply schema and set Activity and XProfile components as active.
     
    762764 */
    763765function bp_update_to_11_0() {
     766    bp_delete_option( '_bp_ignore_deprecated_code' );
    764767
    765768    add_filter( 'bp_email_get_schema', 'bp_core_get_11_0_upgrade_email_schema' );
Note: See TracChangeset for help on using the changeset viewer.