Changeset 6159
- Timestamp:
- 06/30/2012 02:26:50 PM (13 years ago)
- Location:
- trunk/bp-core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/admin/bp-core-settings.php
r6157 r6159 50 50 } 51 51 52 /** 53 * If user has upgraded to 1.6 and chose to retain their BuddyBar, offer then a switch to change over 54 * to the WP Toolbar. 55 * 56 * @since BuddyPress (1.6) 57 */ 58 function bp_admin_setting_callback_force_buddybar() { 59 ?> 60 61 <input id="_bp_force_buddybar" name="_bp_force_buddybar" type="checkbox" value="1" <?php checked( ! bp_force_buddybar( true ) ); ?> /> 62 <label for="_bp_force_buddybar"><?php _e( 'Switch to WordPress Toolbar', 'buddypress' ); ?></label> 63 64 <?php 65 } 66 52 67 /** Activity *******************************************************************/ 53 68 … … 87 102 88 103 <?php 104 } 105 106 /** 107 * Sanitization for _bp_force_buddyvar 108 * 109 * If upgraded to 1.6 and you chose to keep the BuddyBar, a checkbox asks if you want to switch to 110 * the WP Toolbar. The option we store is 1 if the BuddyBar is forced on, so we use this function 111 * to flip the boolean before saving the intval. 112 * 113 * @since BuddyPress (1.6) 114 * @access Private 115 */ 116 function bp_admin_sanitize_callback_force_buddybar( $value = false ) { 117 return $value ? 0 : 1; 89 118 } 90 119 -
trunk/bp-core/bp-core-admin.php
r6156 r6159 287 287 register_setting ( 'buddypress', 'hide-loggedout-adminbar', 'intval' ); 288 288 289 // Allow favorites setting 289 // Only show 'switch to Toolbar' option if the user chose to retain the BuddyBar during the 1.6 upgrade 290 if ( (bool) bp_get_option( '_bp_force_buddybar', false ) ) { 291 add_settings_field( '_bp_force_buddybar', __( 'Toolbar', 'buddypress' ), 'bp_admin_setting_callback_force_buddybar', 'buddypress', 'bp_main' ); 292 register_setting( 'buddypress', '_bp_force_buddybar', 'bp_admin_sanitize_callback_force_buddybar' ); 293 } 294 295 // Allow account deletion 290 296 add_settings_field( 'bp-disable-account-deletion', __( 'Account Deletion', 'buddypress' ), 'bp_admin_setting_callback_account_deletion', 'buddypress', 'bp_main' ); 291 297 register_setting ( 'buddypress', 'bp-disable-account-deletion', 'intval' ); -
trunk/bp-core/css/buddybar.dev.css
r5865 r6159 1 body, 2 body.wp-admin { 1 body:not(.wp-admin) { 3 2 padding-top: 25px !important; 4 3 }
Note: See TracChangeset
for help on using the changeset viewer.