Ticket #15829: 15829.001.diff
| File 15829.001.diff, 5.7 KB (added by , 16 years ago) |
|---|
-
wp-includes/admin-bar.php
314 314 return false; 315 315 316 316 if ( ! isset( $show_admin_bar ) ) { 317 if ( ! is_user_logged_in() || ( is_admin() && ! is_multisite() )) {317 if ( ! is_user_logged_in() ) { 318 318 $show_admin_bar = false; 319 } else if ( is_admin() ) { 320 $show_admin_bar = 'true' == get_user_option('admin_bar_pref_admin'); 319 321 } else { 320 $show_admin_bar = true;322 $show_admin_bar = 'true' == get_user_option('admin_bar_pref_front'); 321 323 } 322 324 } 323 325 -
wp-includes/user.php
507 507 if ( !empty( $qv['include'] ) ) { 508 508 $ids = implode( ',', wp_parse_id_list( $qv['include'] ) ); 509 509 $this->query_where .= " AND $wpdb->users.ID IN ($ids)"; 510 } 511 elseif ( !empty($qv['exclude']) ) { 510 } elseif ( !empty($qv['exclude']) ) { 512 511 $ids = implode( ',', wp_parse_id_list( $qv['exclude'] ) ); 513 512 $this->query_where .= " AND $wpdb->users.ID NOT IN ($ids)"; 514 513 } … … 1446 1445 1447 1446 if ( empty($user_registered) ) 1448 1447 $user_registered = gmdate('Y-m-d H:i:s'); 1448 1449 if ( empty($admin_bar_pref_front) ) 1450 $admin_bar_pref_front = 'true'; 1451 1452 if ( empty($admin_bar_pref_admin) ) 1453 $admin_bar_pref_admin = 'false'; 1449 1454 1450 1455 $user_nicename_check = $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->users WHERE user_nicename = %s AND user_login != %s LIMIT 1" , $user_nicename, $user_login)); 1451 1456 … … 1470 1475 $user_id = (int) $wpdb->insert_id; 1471 1476 } 1472 1477 1473 update_user_meta( $user_id, 'first_name', $first_name );1474 update_user_meta( $user_id, 'last_name', $last_name );1478 update_user_meta( $user_id, 'first_name', $first_name ); 1479 update_user_meta( $user_id, 'last_name', $last_name ); 1475 1480 update_user_meta( $user_id, 'nickname', $nickname ); 1476 1481 update_user_meta( $user_id, 'description', $description ); 1477 update_user_meta( $user_id, 'rich_editing', $rich_editing); 1478 update_user_meta( $user_id, 'comment_shortcuts', $comment_shortcuts); 1479 update_user_meta( $user_id, 'admin_color', $admin_color); 1480 update_user_meta( $user_id, 'use_ssl', $use_ssl); 1482 update_user_meta( $user_id, 'rich_editing', $rich_editing ); 1483 update_user_meta( $user_id, 'comment_shortcuts', $comment_shortcuts ); 1484 update_user_meta( $user_id, 'admin_color', $admin_color ); 1485 update_user_meta( $user_id, 'use_ssl', $use_ssl ); 1486 update_user_meta( $user_id, 'admin_bar_pref_front', $admin_bar_pref_front ); 1487 update_user_meta( $user_id, 'admin_bar_pref_admin', $admin_bar_pref_admin ); 1481 1488 1482 1489 $user = new WP_User($user_id); 1483 1490 -
wp-admin/includes/user.php
118 118 if ( $update ) { 119 119 $user->rich_editing = isset( $_POST['rich_editing'] ) && 'false' == $_POST['rich_editing'] ? 'false' : 'true'; 120 120 $user->admin_color = isset( $_POST['admin_color'] ) ? sanitize_text_field( $_POST['admin_color'] ) : 'fresh'; 121 122 if ( ! apply_filters('show_admin_bar_pref_front', true) ) 123 $user->admin_bar_pref_front = $userdata->admin_bar_pref_front; 124 else 125 $user->admin_bar_pref_front = isset( $_POST['admin_bar_front'] ) ? 'false' : 'true'; 126 127 if ( ! apply_filters('show_admin_bar_pref_admin', true) ) { 128 $user->admin_bar_pref_admin = $userdata->admin_bar_pref_admin; 129 } else { 130 if ( is_multisite() ) 131 $user->admin_bar_pref_admin = isset( $_POST['admin_bar_admin'] ) ? 'false' : 'true'; 132 else 133 $user->admin_bar_pref_admin = isset( $_POST['admin_bar_admin'] ) ? 'true' : 'false'; 134 } 121 135 } 122 136 123 137 $user->comment_shortcuts = isset( $_POST['comment_shortcuts'] ) && 'true' == $_POST['comment_shortcuts'] ? 'true' : ''; -
wp-admin/user-edit.php
211 211 <th scope="row"><?php _e( 'Keyboard Shortcuts' ); ?></th> 212 212 <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> 213 213 </tr> 214 <?php 215 endif; 216 do_action('personal_options', $profileuser); 217 ?> 214 <?php endif; 215 if ( ($show_front = apply_filters('show_admin_bar_pref_front', true)) | ($show_admin = apply_filters('show_admin_bar_pref_admin', true)) ) : ?> 216 <tr> 217 <th scope="row"><?php _e('Admin Bar Preferences')?></th> 218 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Admin Bar Preferences') ?></span></legend> 219 <?php if ( $show_front ) : ?> 220 <label for="admin_bar_front"> 221 <input name="admin_bar_front" type="checkbox" id="admin_bar_front" value="1" <?php checked('false', $profileuser->admin_bar_pref_front); ?> /> 222 <?php _e('Do not display the admin bar on the front end'); ?></label><br /> 223 <?php endif; 224 if ( $show_admin ) : ?> 225 <label for="admin_bar_admin"> 226 <input name="admin_bar_admin" type="checkbox" id="admin_bar_admin" value="1" <?php checked(is_multisite() ? 'false' : 'true', $profileuser->admin_bar_pref_admin); ?> /> 227 <?php if ( is_multisite() ) _e('Do not display the admin bar in the admin'); else _e('Display the admin bar in the admin'); ?></label> 228 <?php endif; ?> 229 </td> 230 </tr> 231 <?php endif; 232 do_action('personal_options', $profileuser); ?> 218 233 </table> 219 234 <?php 220 235 if ( IS_PROFILE_PAGE )
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)