Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/08/2011 06:46:09 PM (10 years ago)
Author:
djpaul
Message:

Switch to use the WP Admin Bar by default. See #3661

File:
1 edited

Legend:

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

    r5151 r5223  
    7979            return false;
    8080
     81        // "Switch to Admin Bar" is an optional option, so handle it here
     82        if ( !empty( $_POST['bp-admin']['bp-force-buddybar'] ) ) {
     83            unset( $_POST['bp-admin']['bp-force-buddybar'] );
     84
     85            // Switch to the WP Admin Bar by removing the BuddyBar override
     86            bp_delete_option( 'bp-force-buddybar' );
     87        }
     88
    8189        // Settings form submitted, now save the settings.
    8290        foreach ( (array)$_POST['bp-admin'] as $key => $value )
     
    164172                    <?php endif; ?>
    165173
     174                    <?php if ( (bool) bp_get_option( 'bp-force-buddybar', false ) ) : ?>
     175                        <tr>
     176                            <th scope="row"><?php _e( 'Switch the site to the WordPress Admin Bar?', 'buddypress' ); ?></th>
     177                            <td>
     178                                <input type="checkbox" name="bp-admin[bp-force-buddybar]" value="1" id="bp-switch-to-admin-bar" />
     179                            </td>
     180                        </tr>
     181                    <?php endif; ?>
     182
    166183                    <?php do_action( 'bp_core_admin_screen_fields' ) ?>
    167184
Note: See TracChangeset for help on using the changeset viewer.