Changeset 11447
- Timestamp:
- 05/24/2009 06:46:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/user-edit.php
r11383 r11447 40 40 } 41 41 42 $all_post_types = apply_filters('all_post_types', array('post', 'page')); 43 $user_can_edit = false; 44 foreach ( $all_post_types as $post_type ) 45 $user_can_edit |= current_user_can("edit_$post_type"); 46 42 47 /** 43 48 * Optional SSL preference that can be turned on by hooking to the 'personal_options' action. … … 131 136 132 137 <table class="form-table"> 133 <?php if ( rich_edit_exists() ) : // don't bother showing the option if the editor has been removed ?>138 <?php if ( rich_edit_exists() && !( IS_PROFILE_PAGE && !$user_can_edit ) ) : // don't bother showing the option if the editor has been removed ?> 134 139 <tr> 135 140 <th scope="row"><?php _e('Visual Editor')?></th> … … 160 165 </fieldset></td> 161 166 </tr> 167 <?php if ( !( IS_PROFILE_PAGE && !$user_can_edit ) ) : ?> 162 168 <tr> 163 169 <th scope="row"><?php _e( 'Keyboard Shortcuts' ); ?></th> … … 165 171 </tr> 166 172 <?php 173 endif; 167 174 endif; 168 175 do_action('personal_options', $profileuser);
Note: See TracChangeset
for help on using the changeset viewer.