Pass the $user_id to the `admin_color_scheme_picker` hook for context. props nacin. see #26607 for trunk.
Built from https://develop.svn.wordpress.org/trunk@26924 git-svn-id: http://core.svn.wordpress.org/trunk@26805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
441ccdd314
commit
60f3e98d51
|
@ -561,7 +561,7 @@ function saveDomDocument($doc, $filename) {
|
|||
*
|
||||
* @since 3.0.0
|
||||
*/
|
||||
function admin_color_scheme_picker() {
|
||||
function admin_color_scheme_picker( $user_id ) {
|
||||
global $_wp_admin_css_colors;
|
||||
|
||||
ksort( $_wp_admin_css_colors );
|
||||
|
@ -571,7 +571,7 @@ function admin_color_scheme_picker() {
|
|||
$_wp_admin_css_colors = array_filter( array_merge( array( 'fresh' => '', 'light' => '' ), $_wp_admin_css_colors ) );
|
||||
}
|
||||
|
||||
$current_color = get_user_option( 'admin_color' );
|
||||
$current_color = get_user_option( 'admin_color', $user_id );
|
||||
|
||||
if ( empty( $current_color ) || ! isset( $_wp_admin_css_colors[ $current_color ] ) ) {
|
||||
$current_color = 'fresh';
|
||||
|
|
|
@ -260,7 +260,7 @@ if ( ! IS_PROFILE_PAGE ) {
|
|||
* @since 3.0.0
|
||||
*/
|
||||
?>
|
||||
<td><?php do_action( 'admin_color_scheme_picker' ); ?></td>
|
||||
<td><?php do_action( 'admin_color_scheme_picker', $user_id ); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
endif; // $_wp_admin_css_colors
|
||||
|
|
Loading…
Reference in New Issue