Skip to:
Content

BuddyPress.org

Changeset 11443 for branches/2.8


Ignore:
Timestamp:
02/22/2017 05:56:41 PM (7 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.

Ports [11442] to the 2.8 branch.

Props r-a-y.
Fixes #7307.

Location:
branches/2.8
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.8

  • branches/2.8/src/bp-blogs/bp-blogs-template.php

    r11381 r11443  
    10781078        echo '<span class="prefix_address">' . $current_site->domain . $current_site->path . '</span> <input name="blogname" type="text" id="blogname" value="'.$blogname.'" maxlength="63" /><br />';
    10791079    else
    1080         echo '<input name="blogname" type="text" id="blogname" value="'.$blogname.'" maxlength="63" ' . bp_get_form_field_attributes( 'blogname' ) . '/> <span class="suffix_address">.' . bp_blogs_get_subdomain_base() . '</span><br />';
     1080        echo '<input name="blogname" type="text" id="blogname" value="'.$blogname.'" maxlength="63" ' . bp_get_form_field_attributes( 'blogname' ) . '/> <span class="suffix_address">.' . bp_signup_get_subdomain_base() . '</span><br />';
    10811081
    10821082    if ( !is_user_logged_in() ) {
  • branches/2.8/src/bp-core/bp-core-adminbar.php

    r10825 r11443  
    6868        _doing_it_wrong( __FUNCTION__, __( 'The BuddyBar is no longer supported. Please migrate to the WordPress toolbar as soon as possible.', 'buddypress' ), '2.1.0' );
    6969
     70        // Load deprecated code if not available.
     71        if ( ! function_exists( 'bp_core_admin_bar' ) ) {
     72            require buddypress()->plugin_dir . 'bp-core/deprecated/2.1.php';
     73        }
     74
    7075        // Keep the WP Toolbar from loading.
    7176        show_admin_bar( false );
  • branches/2.8/src/bp-core/classes/class-bp-admin.php

    r11425 r11443  
    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.