Make WordPress Core

Changeset 17234


Ignore:
Timestamp:
01/07/2011 04:39:18 PM (14 years ago)
Author:
nacin
Message:

Revert _admin_bar_preferences() and add a class to the table row to allow it to be hidden. Forcing the use of CSS at least attempts to ensure that the developer will recognize that the saving aspect isn't handled. Handle this in the future across all settings screens. Reverts [17161]. fixes #16004.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/user-edit.php

    r17201 r17234  
    214214</tr>
    215215<?php endif; ?>
     216<tr>
     217<th scope="row" class="show-admin-bar"><?php _e('Show Admin Bar')?></th>
     218<td><fieldset><legend class="screen-reader-text"><span><?php _e('Show Admin Bar') ?></span></legend>
     219<label for="admin_bar_front">
     220<input name="admin_bar_front" type="checkbox" id="admin_bar_front" value="1" <?php checked( _get_admin_bar_pref( 'front', $profileuser->ID ) ); ?> />
     221<?php /* translators: Show admin bar when viewing site */ _e( 'when viewing site' ); ?></label><br />
     222<label for="admin_bar_admin">
     223<input name="admin_bar_admin" type="checkbox" id="admin_bar_admin" value="1" <?php checked( _get_admin_bar_pref( 'admin', $profileuser->ID ) ); ?> />
     224<?php /* translators: Show admin bar in dashboard */ _e( 'in dashboard' ); ?></label>
     225</td>
     226</tr>
    216227<?php do_action('personal_options', $profileuser); ?>
    217228</table>
  • trunk/wp-includes/admin-bar.php

    r17228 r17234  
    361361}
    362362
    363 /**
    364  * Add the admin bar display preferences to user profiles.
    365  *
    366  * @since 3.1.0
    367  * @access private
    368  */
    369 function _admin_bar_preferences( $profileuser ) {
    370363?>
    371 <tr>
    372 <th scope="row"><?php _e('Show Admin Bar')?></th>
    373 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Show Admin Bar') ?></span></legend>
    374 <label for="admin_bar_front">
    375 <input name="admin_bar_front" type="checkbox" id="admin_bar_front" value="1" <?php checked( _get_admin_bar_pref( 'front', $profileuser->ID ) ); ?> />
    376 <?php /* translators: Show admin bar when viewing site */ _e( 'when viewing site' ); ?></label><br />
    377 <label for="admin_bar_admin">
    378 <input name="admin_bar_admin" type="checkbox" id="admin_bar_admin" value="1" <?php checked( _get_admin_bar_pref( 'admin', $profileuser->ID ) ); ?> />
    379 <?php /* translators: Show admin bar in dashboard */ _e( 'in dashboard' ); ?></label>
    380 </td>
    381 </tr>
    382 <?php
    383 }
    384 add_action( 'personal_options', '_admin_bar_preferences' );
    385 
    386 ?>
Note: See TracChangeset for help on using the changeset viewer.