Skip to:
Content

BuddyPress.org

Changeset 7767


Ignore:
Timestamp:
01/30/2014 06:41:11 PM (10 years ago)
Author:
boonebgorges
Message:

Make it possible to prevent deprecated functions from loading

Until version 1.1, BP had a constant BP_IGNORE_DEPRECATED that kept BP from
loading the files that contain deprecated functions. This was mysteriously
removed for 1.2. Meanwhile, it was impossible to prevent deprecated functions
from being loaded.

This changeset reintroduces BP_IGNORE_DEPRECATED and uses it to decide whether
deprecated functions should be loaded. There is also a new filter
'bp_ignore_deprecated' that serves a similar purpose, but in filter form.

Fixes #5361

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-loader.php

    r7760 r7767  
    277277        }
    278278
     279        // Whether to refrain from loading deprecated functions
     280        if ( ! defined( 'BP_IGNORE_DEPRECATED' ) ) {
     281            define( 'BP_IGNORE_DEPRECATED', false );
     282        }
     283
    279284        // The search slug has to be defined nice and early because of the way
    280285        // search requests are loaded
     
    304309        /** Loading ***************************************************/
    305310
    306         $this->load_deprecated  = true;
     311        $this->load_deprecated = ! apply_filters( 'bp_ignore_deprecated', BP_IGNORE_DEPRECATED );
    307312
    308313        /** Toolbar ***************************************************/
Note: See TracChangeset for help on using the changeset viewer.