diff --git a/src/wp-admin/about.php b/src/wp-admin/about.php index 955ded133c..0f9b1dc19a 100644 --- a/src/wp-admin/about.php +++ b/src/wp-admin/about.php @@ -81,15 +81,17 @@ include( ABSPATH . 'wp-admin/admin-header.php' );

+ 1 && has_action('admin_color_scheme_picker') ) :?> -

visit your profile settings.' ), get_edit_profile_url( get_current_user_id() ) ); ?>

+

visit your profile settings.' ), get_edit_profile_url( $user_id ) ); ?>

diff --git a/src/wp-admin/js/about.js b/src/wp-admin/js/about.js index b7290cc20d..e96b72ce2c 100644 --- a/src/wp-admin/js/about.js +++ b/src/wp-admin/js/about.js @@ -1,4 +1,4 @@ -/* global isRtl */ +/* global ajaxurl */ (function($){ $(document).ready( function() { @@ -10,9 +10,6 @@ $colorpicker = $( '#color-picker' ); $stylesheet = $( '#colors-css' ); - if ( isRtl ){ - $stylesheet = $( '#colors-rtl-css' ); - } $colorpicker.on( 'click.colorpicker', '.color-option', function() { var colors, css_url, @@ -28,10 +25,6 @@ // Set color scheme // Load the colors stylesheet css_url = $this.children( '.css_url' ).val(); - if ( isRtl ){ - css_url = css_url.replace('.min', '-rtl.min'); - } - $stylesheet.attr( 'href', css_url ); // repaint icons @@ -45,6 +38,13 @@ wp.svgPainter.paint(); } } + + // update user option + $.post( ajaxurl, { + action: 'save-user-color-scheme', + color_scheme: $this.children( 'input[name="admin_color"]' ).val(), + nonce: $('#_wpnonce').val() + }); }); });