Ticket #8433: 8433.diff
| File 8433.diff, 1.8 KB (added by , 17 years ago) |
|---|
-
wp-admin/user-edit.php
14 14 else 15 15 $is_profile_page = false; 16 16 17 $all_post_types = apply_filters('all_post_types', array('post', 'page')); 18 $user_can_edit = false; 19 foreach ( $all_post_types as $post_type ) 20 $user_can_edit |= current_user_can("edit_$post_type"); 21 17 22 /** 18 23 * Display JavaScript for profile page. 19 24 * … … 200 205 <h3><?php _e('Personal Options'); ?></h3> 201 206 202 207 <table class="form-table"> 203 <?php if ( rich_edit_exists() ) : // don't bother showing the option if the editor has been removed ?>208 <?php if ( rich_edit_exists() && !( $is_profile_page && !$user_can_edit ) ) : // don't bother showing the option if the editor has been removed ?> 204 209 <tr> 205 210 <th scope="row"><?php _e('Visual Editor')?></th> 206 211 <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> … … 229 234 <?php endforeach; ?> 230 235 </fieldset></td> 231 236 </tr> 237 <?php if ( !( $is_profile_page && !$user_can_edit ) ) : ?> 232 238 <tr> 233 239 <th scope="row"><?php _e( 'Keyboard Shortcuts' ); ?></th> 234 240 <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">More information</a>'); ?></td> 235 241 </tr> 236 242 <?php 237 243 endif; 244 endif; 238 245 do_action('personal_options', $profileuser); 239 246 ?> 240 247 </table>