WordPress.org

Make WordPress Core

Ticket #16004: 16004.diff

File 16004.diff, 2.6 KB (added by nacin, 3 years ago)
  • wp-includes/admin-bar.php

     
    359359         
    360360        return 'true' === $pref; 
    361361} 
     362 
     363/** 
     364 * Add the admin bar display preferences to user profiles. 
     365 * 
     366 * @since 3.1.0 
     367 * @access private 
     368 */ 
     369function _admin_bar_preferences( $profileuser ) { 
    362370?> 
     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} 
     384add_action( 'personal_options', '_admin_bar_preferences' ); 
     385 
     386?> 
     387 No newline at end of file 
  • wp-admin/user-edit.php

     
    212212<td><label for="comment_shortcuts"><input type="checkbox" name="comment_shortcuts" id="comment_shortcuts" value="true" <?php if ( !empty($profileuser->comment_shortcuts) ) checked('true', $profileuser->comment_shortcuts); ?> /> <?php _e('Enable keyboard shortcuts for comment moderation.'); ?></label> <?php _e('<a href="http://codex.wordpress.org/Keyboard_Shortcuts" target="_blank">More information</a>'); ?></td> 
    213213</tr> 
    214214<?php endif; ?> 
    215 <tr> 
    216 <th scope="row"><?php _e('Show Admin Bar')?></th> 
    217 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Show Admin Bar') ?></span></legend> 
    218 <label for="admin_bar_front"> 
    219 <input name="admin_bar_front" type="checkbox" id="admin_bar_front" value="1" <?php checked( _get_admin_bar_pref( 'front', $profileuser->ID ) ); ?> /> 
    220 <?php /* translators: Show admin bar when viewing site */ _e( 'when viewing site' ); ?></label><br /> 
    221 <label for="admin_bar_admin"> 
    222 <input name="admin_bar_admin" type="checkbox" id="admin_bar_admin" value="1" <?php checked( _get_admin_bar_pref( 'admin', $profileuser->ID ) ); ?> /> 
    223 <?php /* translators: Show admin bar in dashboard */ _e( 'in dashboard' ); ?></label> 
    224 </td> 
    225 </tr> 
    226215<?php do_action('personal_options', $profileuser); ?> 
    227216</table> 
    228217<?php