Skip to:
Content

BuddyPress.org

Changeset 11361


Ignore:
Timestamp:
12/29/2016 09:04:59 PM (8 years ago)
Author:
boonebgorges
Message:

Remove conditional checks for initializing navigation back compat.

Nav back compat requires ArrayAccess, which is only guaranteed to
be available in PHP 5.3+.

See #7299.

Location:
trunk/src
Files:
3 edited

Legend:

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

    r11290 r11361  
    801801
    802802    // Reset backcompat nav items so that subsequent references will be correct.
    803     if ( buddypress()->do_nav_backcompat ) {
    804         $bp->bp_nav->reset();
    805         $bp->bp_options_nav->reset();
    806     }
     803    $bp->bp_nav->reset();
     804    $bp->bp_options_nav->reset();
    807805
    808806    if ( ! is_array( $screen_functions ) ) {
     
    852850
    853851    // Reset backcompat nav items so that subsequent references will be correct.
    854     if ( buddypress()->do_nav_backcompat ) {
    855         $bp->bp_nav->reset();
    856         $bp->bp_options_nav->reset();
    857     }
     852    $bp->bp_nav->reset();
     853    $bp->bp_options_nav->reset();
    858854
    859855    if ( ! is_array( $screen_functions ) ) {
  • trunk/src/bp-core/classes/class-bp-core.php

    r10825 r11361  
    255255
    256256        // Backward compatibility for plugins modifying the legacy bp_nav and bp_options_nav global properties.
    257         if ( buddypress()->do_nav_backcompat ) {
    258             $bp->bp_nav         = new BP_Core_BP_Nav_BackCompat();
    259             $bp->bp_options_nav = new BP_Core_BP_Options_Nav_BackCompat();
    260         }
     257        $bp->bp_nav         = new BP_Core_BP_Nav_BackCompat();
     258        $bp->bp_options_nav = new BP_Core_BP_Options_Nav_BackCompat();
    261259
    262260        /**
  • trunk/src/bp-loader.php

    r11360 r11361  
    110110    public $do_autoload = true;
    111111
    112     /**
    113      * Whether to load backward compatibility classes for navigation globals.
    114      *
    115      * @since 2.6.0
    116      * @var bool
    117      */
    118     public $do_nav_backcompat = false;
    119 
    120112    /** Option Overload *******************************************************/
    121113
     
    424416        $this->email_post_type     = apply_filters( 'bp_email_post_type', 'bp-email' );
    425417        $this->email_taxonomy_type = apply_filters( 'bp_email_tax_type', 'bp-email-type' );
    426 
    427         /** Navigation backward compatibility *********************************/
    428         if ( interface_exists( 'ArrayAccess', false ) ) {
    429             // bp_nav and bp_options_nav compatibility depends on SPL.
    430             $this->do_nav_backcompat = true;
    431         }
    432418    }
    433419
Note: See TracChangeset for help on using the changeset viewer.