Rename mp6_color_scheme JS global to wp_color_scheme.

props kovshenin.
see #26263.

git-svn-id: https://develop.svn.wordpress.org/trunk@26406 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2013-11-26 13:57:58 +00:00
parent 316a125c4c
commit 42da7f3053
2 changed files with 4 additions and 4 deletions

View File

@ -621,7 +621,7 @@ function set_color_scheme_json() {
$color_scheme = get_user_option( 'admin_color' );
if ( isset( $_wp_admin_css_colors[ $color_scheme ]->icon_colors ) ) {
echo '<script type="text/javascript">var mp6_color_scheme = ' . json_encode( array( 'icons' => $_wp_admin_css_colors[ $color_scheme ]->icon_colors ) ) . ";</script>\n";
echo '<script type="text/javascript">var wp_color_scheme = ' . json_encode( array( 'icons' => $_wp_admin_css_colors[ $color_scheme ]->icon_colors ) ) . ";</script>\n";
}
}
add_action( 'admin_head', 'set_color_scheme_json' );

View File

@ -1,4 +1,4 @@
/* global mp6_color_scheme:true */
/* global wp_color_scheme:true */
var svgPainter = ( function( $, window, document, undefined ) {
'use strict';
@ -30,8 +30,8 @@ var svgPainter = ( function( $, window, document, undefined ) {
setColors : function( colors ) {
if ( typeof colors === 'undefined' && typeof mp6_color_scheme !== 'undefined' ) {
colors = mp6_color_scheme;
if ( typeof colors === 'undefined' && typeof wp_color_scheme !== 'undefined' ) {
colors = wp_color_scheme;
}
this.colorscheme = colors;