Skip to:
Content

BuddyPress.org

Changeset 13363


Ignore:
Timestamp:
11/11/2022 09:26:12 AM (2 years ago)
Author:
imath
Message:

Introduce the BP_LOAD_DEPRECATED constant

Setting this constant to true will force all deprecated code to load. This replaces the previous double negation approach where we needed to define BP_IGNORE_DEPRECATED to false to load all deprecated code.

props johnjamesjacoby

Closes https://github.com/buddypress/buddypress/pull/36
Fixes #8687

File:
1 edited

Legend:

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

    r13323 r13363  
    47424742function bp_get_deprecated_functions_versions() {
    47434743    $ignore_deprecated = null;
    4744     if ( defined( 'BP_IGNORE_DEPRECATED' ) ) {
     4744
     4745    // Do ignore deprecated => ignore all deprecated code.
     4746    if ( defined( 'BP_IGNORE_DEPRECATED' ) && BP_IGNORE_DEPRECATED ) {
    47454747        $ignore_deprecated = (bool) BP_IGNORE_DEPRECATED;
     4748    }
     4749
     4750    // Do not ignore deprecated => load all deprecated code.
     4751    if ( defined( 'BP_LOAD_DEPRECATED' ) && BP_LOAD_DEPRECATED ) {
     4752        $ignore_deprecated = ! (bool) BP_LOAD_DEPRECATED;
    47464753    }
    47474754
Note: See TracChangeset for help on using the changeset viewer.