WordPress.org

Make WordPress Core

Ticket #33165: 33165.diff

File 33165.diff, 1.2 KB (added by morganestes, 6 years ago)

Remove the 'Show Toolbar when viewing site' option from the user admin screen

  • src/wp-admin/user-edit.php

    diff --git src/wp-admin/user-edit.php src/wp-admin/user-edit.php
    index c126be4..c508701 100644
    if ( !( IS_PROFILE_PAGE && !$user_can_edit ) ) : ?> 
    265265<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="https://codex.wordpress.org/Keyboard_Shortcuts" target="_blank">More information</a>'); ?></td>
    266266</tr>
    267267<?php endif; ?>
    268 <tr class="show-admin-bar user-admin-bar-front-wrap">
    269 <th scope="row"><?php _e( 'Toolbar' ); ?></th>
    270 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Toolbar') ?></span></legend>
    271 <label for="admin_bar_front">
    272 <input name="admin_bar_front" type="checkbox" id="admin_bar_front" value="1"<?php checked( _get_admin_bar_pref( 'front', $profileuser->ID ) ); ?> />
    273 <?php _e( 'Show Toolbar when viewing site' ); ?></label><br />
    274 </fieldset>
    275 </td>
    276 </tr>
     268
    277269<?php
    278270/**
    279271 * Fires at the end of the 'Personal Options' settings table on the user editing screen.