WordPress.org

Make WordPress Core

Ticket #17328: 17328.diff

File 17328.diff, 1.0 KB (added by sorich87, 4 years ago)

Adds empty check

  • wp-admin/user-edit.php

     
    196196<?php if ( rich_edit_exists() && !( IS_PROFILE_PAGE && !$user_can_edit ) ) : // don't bother showing the option if the editor has been removed ?> 
    197197        <tr> 
    198198                <th scope="row"><?php _e('Visual Editor')?></th> 
    199                 <td><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="false" <?php checked('false', $profileuser->rich_editing); ?> /> <?php _e('Disable the visual editor when writing'); ?></label></td> 
     199                <td><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="false" <?php if ( ! empty( $profileuser->rich_editing ) ) checked('false', $profileuser->rich_editing); ?> /> <?php _e('Disable the visual editor when writing'); ?></label></td> 
    200200        </tr> 
    201201<?php endif; ?> 
    202202<?php if ( count($_wp_admin_css_colors) > 1 && has_action('admin_color_scheme_picker') ) : ?>