Pass the $user_id to the admin_color_scheme_picker
hook for context. props nacin. see #26607 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@26924 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3a07d0292c
commit
7fc9941d2a
@ -561,7 +561,7 @@ function saveDomDocument($doc, $filename) {
|
|||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*/
|
*/
|
||||||
function admin_color_scheme_picker() {
|
function admin_color_scheme_picker( $user_id ) {
|
||||||
global $_wp_admin_css_colors;
|
global $_wp_admin_css_colors;
|
||||||
|
|
||||||
ksort( $_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 ) );
|
$_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 ] ) ) {
|
if ( empty( $current_color ) || ! isset( $_wp_admin_css_colors[ $current_color ] ) ) {
|
||||||
$current_color = 'fresh';
|
$current_color = 'fresh';
|
||||||
|
@ -260,7 +260,7 @@ if ( ! IS_PROFILE_PAGE ) {
|
|||||||
* @since 3.0.0
|
* @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>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
endif; // $_wp_admin_css_colors
|
endif; // $_wp_admin_css_colors
|
||||||
|
Loading…
Reference in New Issue
Block a user