WordPress.org

Make WordPress Core

Changeset 26937


Ignore:
Timestamp:
01/13/2014 04:27:40 PM (5 years ago)
Author:
nacin
Message:

Pass the $user_id to the admin_color_scheme_picker hook for context.

Prevents the admin color scheme from changing when editing another user.

Merges [26924] to the 3.8 branch.
see #26607.

Location:
branches/3.8
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/3.8

  • branches/3.8/src/wp-admin/includes/misc.php

    r26814 r26937  
    562562 * @since 3.0.0
    563563 */
    564 function admin_color_scheme_picker() {
     564function admin_color_scheme_picker( $user_id ) {
    565565    global $_wp_admin_css_colors;
    566566
     
    572572    }
    573573
    574     $current_color = get_user_option( 'admin_color' );
     574    $current_color = get_user_option( 'admin_color', $user_id );
    575575
    576576    if ( empty( $current_color ) || ! isset( $_wp_admin_css_colors[ $current_color ] ) ) {
  • branches/3.8/src/wp-admin/user-edit.php

    r26518 r26937  
    261261 */
    262262?>
    263 <td><?php do_action( 'admin_color_scheme_picker' ); ?></td>
     263<td><?php do_action( 'admin_color_scheme_picker', $user_id ); ?></td>
    264264</tr>
    265265<?php
Note: See TracChangeset for help on using the changeset viewer.