Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/22/2017 05:54:26 PM (5 years ago)
Author:
boonebgorges
Message:

Ensure that deprecated code is available when required.

  • Avoid calling a deprecated bp-blogs function when a non-deprecated version is available.
  • Ensure that legacy BuddyBar code is loaded when the BuddyBar is forced on.

Props r-a-y.
Fixes #7307.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-admin.php

    r11425 r11442  
    383383        // Only show 'switch to Toolbar' option if the user chose to retain the BuddyBar during the 1.6 upgrade.
    384384        if ( (bool) bp_get_option( '_bp_force_buddybar', false ) ) {
     385            // Load deprecated code if not available.
     386            if ( ! function_exists( 'bp_admin_setting_callback_force_buddybar' ) ) {
     387                require buddypress()->plugin_dir . 'bp-core/deprecated/2.1.php';
     388            }
     389
    385390            add_settings_field( '_bp_force_buddybar', __( 'Toolbar', 'buddypress' ), 'bp_admin_setting_callback_force_buddybar', 'buddypress', 'bp_main' );
    386391            register_setting( 'buddypress', '_bp_force_buddybar', 'bp_admin_sanitize_callback_force_buddybar' );
Note: See TracChangeset for help on using the changeset viewer.