<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[26601] trunk/src: Svg-painter:</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/26601">26601</a></dd>
<dt>Author</dt> <dd>azaozz</dd>
<dt>Date</dt> <dd>2013-12-04 04:12:41 +0000 (Wed, 04 Dec 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Svg-painter:
- Clean up the JS, better names, etc.
- Convert the base64 encode/decode code from jQuery plugin to local use.
- Add missing icon colors for the default theme.
- Make it more error-proof.
Fixes <a href="http://core.trac.wordpress.org/ticket/26333">#26333</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesmiscphp">trunk/src/wp-admin/includes/misc.php</a></li>
<li><a href="#trunksrcwpadminjsuserprofilejs">trunk/src/wp-admin/js/user-profile.js</a></li>
<li><a href="#trunksrcwpincludesgeneraltemplatephp">trunk/src/wp-includes/general-template.php</a></li>
<li><a href="#trunksrcwpincludesjssvgpainterjs">trunk/src/wp-includes/js/svg-painter.js</a></li>
<li><a href="#trunksrcwpincludesscriptloaderphp">trunk/src/wp-includes/script-loader.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesmiscphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/includes/misc.php (26600 => 26601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/includes/misc.php     2013-12-04 03:31:20 UTC (rev 26600)
+++ trunk/src/wp-admin/includes/misc.php        2013-12-04 04:12:41 UTC (rev 26601)
</span><span class="lines">@@ -613,16 +613,16 @@
</span><span class="cx">  <?php
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function set_color_scheme_json() {
</del><ins>+function wp_color_scheme_settings() {
</ins><span class="cx">   global $_wp_admin_css_colors;
</span><span class="cx"> 
</span><span class="cx">  $color_scheme = get_user_option( 'admin_color' );
</span><span class="cx"> 
</span><del>-       if ( isset( $_wp_admin_css_colors[ $color_scheme ]->icon_colors ) ) {
-               echo '<script type="text/javascript">var wp_color_scheme = ' . json_encode( array( 'icons' => $_wp_admin_css_colors[ $color_scheme ]->icon_colors ) ) . ";</script>\n";
</del><ins>+        if ( ! empty( $_wp_admin_css_colors[ $color_scheme ]->icon_colors ) ) {
+               echo '<script type="text/javascript">var _wpColorScheme = ' . json_encode( array( 'icons' => $_wp_admin_css_colors[ $color_scheme ]->icon_colors ) ) . ";</script>\n";
</ins><span class="cx">   }
</span><span class="cx"> }
</span><del>-add_action( 'admin_head', 'set_color_scheme_json' );
</del><ins>+add_action( 'admin_head', 'wp_color_scheme_settings' );
</ins><span class="cx"> 
</span><span class="cx"> function _ipad_meta() {
</span><span class="cx">  if ( wp_is_mobile() ) {
</span></span></pre></div>
<a id="trunksrcwpadminjsuserprofilejs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/js/user-profile.js (26600 => 26601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/js/user-profile.js    2013-12-04 03:31:20 UTC (rev 26600)
+++ trunk/src/wp-admin/js/user-profile.js       2013-12-04 04:12:41 UTC (rev 26601)
</span><span class="lines">@@ -83,7 +83,8 @@
</span><span class="cx">          current_user_id = $( 'input[name="checkuser_id"]' ).val();
</span><span class="cx"> 
</span><span class="cx">          $colorpicker.on( 'click.colorpicker', '.color-option', function() {
</span><del>-                       var $this = $(this);
</del><ins>+                        var colors,
+                               $this = $(this);
</ins><span class="cx"> 
</span><span class="cx">                  if ( $this.hasClass( 'selected' ) ) {
</span><span class="cx">                          return;
</span><span class="lines">@@ -99,8 +100,14 @@
</span><span class="cx"> 
</span><span class="cx">                          // repaint icons
</span><span class="cx">                          if ( typeof window.svgPainter !== 'undefined' ) {
</span><del>-                                       svgPainter.setColors( $.parseJSON( $this.children( '.icon_colors' ).val() ) );
-                                       svgPainter.paint();
</del><ins>+                                        try {
+                                               colors = $.parseJSON( $this.children( '.icon_colors' ).val() );
+                                       } catch ( error ) {}
+
+                                       if ( colors ) {
+                                               svgPainter.setColors( colors );
+                                               svgPainter.paint();
+                                       }
</ins><span class="cx">                           }
</span><span class="cx"> 
</span><span class="cx">                          // update user option
</span></span></pre></div>
<a id="trunksrcwpincludesgeneraltemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/general-template.php (26600 => 26601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/general-template.php       2013-12-04 03:31:20 UTC (rev 26600)
+++ trunk/src/wp-includes/general-template.php  2013-12-04 04:12:41 UTC (rev 26601)
</span><span class="lines">@@ -2117,7 +2117,8 @@
</span><span class="cx"> function register_admin_color_schemes() {
</span><span class="cx">  wp_admin_css_color( 'fresh', _x( 'Default', 'admin color scheme' ),
</span><span class="cx">          admin_url( 'css/colors.min.css' ),
</span><del>-               array( '#222', '#333', '#0074a2', '#2ea2cc' )
</del><ins>+                array( '#222', '#333', '#0074a2', '#2ea2cc' ),
+               array( 'base' => '#999', 'focus' => '#2ea2cc', 'current' => '#fff' )
</ins><span class="cx">   );
</span><span class="cx"> 
</span><span class="cx">  // Other color schemes are not available when running out of src
</span></span></pre></div>
<a id="trunksrcwpincludesjssvgpainterjs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/js/svg-painter.js (26600 => 26601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/js/svg-painter.js  2013-12-04 03:31:20 UTC (rev 26600)
+++ trunk/src/wp-includes/js/svg-painter.js     2013-12-04 04:12:41 UTC (rev 26601)
</span><span class="lines">@@ -1,106 +1,182 @@
</span><span class="cx"> /* global wp_color_scheme:true */
</span><span class="cx"> var svgPainter = ( function( $, window, document, undefined ) {
</span><del>-
</del><span class="cx">   'use strict';
</span><ins>+       var selector, base64,
+               colorscheme = {}, 
+               elements = [];
</ins><span class="cx"> 
</span><span class="cx">  $(document).ready( function() {
</span><del>-
</del><span class="cx">           // detection for browser SVG capability
</span><span class="cx">          if ( document.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#Image', '1.1' ) ) {
</span><del>-                       document.body.className = document.body.className.replace( 'no-svg', 'svg' );
</del><ins>+                        $( document.body ).removeClass( 'no-svg' ).addClass( 'svg' );
+                       svgPainter.init();
</ins><span class="cx">           }
</span><ins>+       });
</ins><span class="cx"> 
</span><del>-               svgPainter.init();
</del><ins>+        /**
+        * Needed only for IE9
+        *
+        * Based on jquery.base64.js 0.0.3 - https://github.com/yckart/jquery.base64.js
+        *
+        * Based on: https://gist.github.com/Yaffle/1284012
+        *
+        * Copyright (c) 2012 Yannick Albert (http://yckart.com)
+        * Licensed under the MIT license
+        * http://www.opensource.org/licenses/mit-license.php
+        */
+       base64 = ( function() {
+               var c,
+                       b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
+                       a256 = '',
+                       r64 = [256],
+                       r256 = [256],
+                       i = 0;
</ins><span class="cx"> 
</span><del>-       });
</del><ins>+                while( i < 256 ) {
+                       c = String.fromCharCode(i);
+                       a256 += c;
+                       r256[i] = i;
+                       r64[i] = b64.indexOf(c);
+                       ++i;
+               }
</ins><span class="cx"> 
</span><del>-       return {
</del><ins>+                function code( s, discard, alpha, beta, w1, w2 ) {
+                       var tmp, length,
+                               buffer = 0,
+                               i = 0,
+                               result = '',
+                               bitsInBuffer = 0;
</ins><span class="cx"> 
</span><del>-               elements : [],
</del><ins>+                        s = String(s);
+                       length = s.length;
</ins><span class="cx"> 
</span><del>-               init : function() {
</del><ins>+                        while( i < length ) {
+                               c = s.charCodeAt(i);
+                               c = c < 256 ? alpha[c] : -1;
</ins><span class="cx"> 
</span><del>-                       this.selector = $( '#adminmenu .wp-menu-image, #wpadminbar .ab-item' );
</del><ins>+                                buffer = ( buffer << w1 ) + c;
+                               bitsInBuffer += w1;
</ins><span class="cx"> 
</span><ins>+                               while( bitsInBuffer >= w2 ) {
+                                       bitsInBuffer -= w2;
+                                       tmp = buffer >> bitsInBuffer;
+                                       result += beta.charAt(tmp);
+                                       buffer ^= tmp << bitsInBuffer;
+                               }
+                               ++i;
+                       }
+
+                       if ( ! discard && bitsInBuffer > 0 ) {
+                               result += beta.charAt( buffer << ( w2 - bitsInBuffer ) );
+                       }
+
+                       return result;
+               }
+
+               function btoa( plain ) {
+                       plain = code( plain, false, r256, b64, 8, 6 );
+                       return plain + '===='.slice( ( plain.length % 4 ) || 4 );
+               }
+
+               function atob( coded ) {
+                       var i;
+
+                       coded = coded.replace( /[^A-Za-z0-9\+\/\=]/g, '' );
+                       coded = String(coded).split('=');
+                       i = coded.length;
+
+                       do {
+                               --i;
+                               coded[i] = code( coded[i], true, r64, a256, 6, 8 );
+                       } while ( i > 0 );
+
+                       coded = coded.join('');
+                       return coded;
+               }
+
+               return {
+                       atob: atob,
+                       btoa: btoa
+               };
+       })();
+
+       return {
+               init: function() {
+                       selector = $( '#adminmenu .wp-menu-image, #wpadminbar .ab-item' );
+
</ins><span class="cx">                   this.setColors();
</span><span class="cx">                  this.findElements();
</span><span class="cx">                  this.paint();
</span><del>-
</del><span class="cx">           },
</span><span class="cx"> 
</span><del>-               setColors : function( colors ) {
</del><ins>+                setColors: function( colors ) {
+                       if ( typeof colors === 'undefined' && typeof window._wpColorScheme !== 'undefined' ) {
+                               colors = window._wpColorScheme;
+                       }
</ins><span class="cx"> 
</span><del>-                       if ( typeof colors === 'undefined' && typeof wp_color_scheme !== 'undefined' ) {
-                               colors = wp_color_scheme;
</del><ins>+                        if ( colors && colors.icons && colors.icons.base && colors.icons.current && colors.icons.focus ) {
+                               colorscheme = colors.icons;
</ins><span class="cx">                   }
</span><del>-
-                       this.colorscheme = colors;
-
</del><span class="cx">           },
</span><span class="cx"> 
</span><del>-               findElements : function() {
</del><ins>+                findElements: function() {
+                       selector.each( function() {
+                               var $this = $(this), bgImage = $this.css( 'background-image' );
</ins><span class="cx"> 
</span><del>-                       this.selector.each(function() {
-
-                               var bgimg = $(this).css( 'background-image' );
-
-                               if ( bgimg.indexOf( 'data:image/svg+xml;base64' ) != -1 ) {
-                                       svgPainter.elements.push( $(this) );
</del><ins>+                                if ( bgImage && bgImage.indexOf( 'data:image/svg+xml;base64' ) != -1 ) {
+                                       elements.push( $this );
</ins><span class="cx">                           }
</span><del>-
</del><span class="cx">                   });
</span><del>-
</del><span class="cx">           },
</span><span class="cx"> 
</span><del>-               paint : function() {
-
</del><ins>+                paint: function() {
</ins><span class="cx">                   // loop through all elements
</span><del>-                       $.each( this.elements, function( index, $element ) {
-
</del><ins>+                        $.each( elements, function( index, $element ) {
</ins><span class="cx">                           var $menuitem = $element.parent().parent();
</span><span class="cx"> 
</span><span class="cx">                          if ( $menuitem.hasClass( 'current' ) || $menuitem.hasClass( 'wp-has-current-submenu' ) ) {
</span><del>-
</del><span class="cx">                                   // paint icon in 'current' color
</span><del>-                                       svgPainter.paintElement( $element, svgPainter.colorscheme.icons.current );
-
</del><ins>+                                        svgPainter.paintElement( $element, 'current' );
</ins><span class="cx">                           } else {
</span><del>-
</del><span class="cx">                                   // paint icon in base color
</span><del>-                                       svgPainter.paintElement( $element, svgPainter.colorscheme.icons.base );
</del><ins>+                                        svgPainter.paintElement( $element, 'base' );
</ins><span class="cx"> 
</span><span class="cx">                                  // set hover callbacks
</span><span class="cx">                                  $menuitem.hover(
</span><del>-                                               function() { svgPainter.paintElement( $element, svgPainter.colorscheme.icons.focus ); },
-                                               function() { svgPainter.paintElement( $element, svgPainter.colorscheme.icons.base ); }
</del><ins>+                                                function() { svgPainter.paintElement( $element, 'focus' ); },
+                                               function() { svgPainter.paintElement( $element, 'base' ); }
</ins><span class="cx">                                   );
</span><del>-
</del><span class="cx">                           }
</span><del>-
</del><span class="cx">                   });
</span><del>-
</del><span class="cx">           },
</span><span class="cx"> 
</span><del>-               paintElement : function( $element, color ) {
</del><ins>+                paintElement: function( $element, colorType ) {
+                       var xml, encoded, color;
</ins><span class="cx"> 
</span><ins>+                       if ( ! colorType || ! colorscheme.hasOwnProperty( colorType ) ) {
+                               return;
+                       }
+
+                       color = colorscheme[ colorType ];
+
</ins><span class="cx">                   // only accept hex colors: #101 or #101010
</span><del>-                       if ( ! color.match( /^(#[0-9a-f]{3}|#[0-9a-f]{6})$/i ) )
</del><ins>+                        if ( ! color.match( /^(#[0-9a-f]{3}|#[0-9a-f]{6})$/i ) ) {
</ins><span class="cx">                           return;
</span><ins>+                       }
</ins><span class="cx"> 
</span><del>-                       var xml = $element.data( 'mp6-svg-' + color ),
-                               base64;
</del><ins>+                        xml = $element.data( 'mp6-svg-' + color );
</ins><span class="cx"> 
</span><span class="cx">                  if ( ! xml ) {
</span><ins>+                               encoded = $element.css( 'background-image' ).match( /.+data:image\/svg\+xml;base64,(.+?)['"] ?\)/ );
</ins><span class="cx"> 
</span><del>-                               base64 = $element.css( 'background-image' ).match( /.+data:image\/svg\+xml;base64,(.+)\)/ );
-
-                               if ( ! base64 )
</del><ins>+                                if ( ! encoded || ! encoded[1] ) {
</ins><span class="cx">                                   return;
</span><ins>+                               }
</ins><span class="cx"> 
</span><del>-                               try {
-                                       xml = window.atob( base64[1] );
-                               } catch ( e ) {
-                                       xml = $.base64.atob( base64[1] );
</del><ins>+                                if ( 'atob' in window ) {
+                                       xml = window.atob( encoded[1] );
+                               } else {
+                                       xml = base64.atob( encoded[1] );
</ins><span class="cx">                           }
</span><span class="cx"> 
</span><span class="cx">                          // replace `fill` attributes
</span><span class="lines">@@ -112,97 +188,17 @@
</span><span class="cx">                          // replace `fill` properties in `<style>` tags
</span><span class="cx">                          xml = xml.replace( /fill:.*?;/g, 'fill: ' + color + ';');
</span><span class="cx"> 
</span><del>-                               try {
</del><ins>+                                if ( 'btoa' in window ) {
</ins><span class="cx">                                   xml = window.btoa( xml );
</span><del>-                               } catch ( e ) {
-                                       xml = $.base64.btoa( xml );
</del><ins>+                                } else {
+                                       xml = base64.btoa( xml );
</ins><span class="cx">                           }
</span><span class="cx"> 
</span><span class="cx">                          $element.data( 'mp6-svg-' + color, xml );
</span><del>-
</del><span class="cx">                   }
</span><span class="cx"> 
</span><span class="cx">                  $element.attr( 'style', 'background-image: url("data:image/svg+xml;base64,' + xml + '") !important;' );
</span><del>-
</del><span class="cx">           }
</span><del>-
</del><span class="cx">   };
</span><span class="cx"> 
</span><span class="cx"> })( jQuery, window, document );
</span><del>-
-/*!
- * Customized for MP6
- *
- * Based on jquery.base64.js 0.0.3 - https://github.com/yckart/jquery.base64.js
- *
- * Based upon: https://gist.github.com/Yaffle/1284012
- *
- * Copyright (c) 2012 Yannick Albert (http://yckart.com)
- * Licensed under the MIT license
- * http://www.opensource.org/licenses/mit-license.php
- **/
-;(function($) {
-
-    var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
-        a256 = '',
-        r64 = [256],
-        r256 = [256],
-        i = 0,
-               c, Plugin;
-
-    while(i < 256) {
-        c = String.fromCharCode(i);
-        a256 += c;
-        r256[i] = i;
-        r64[i] = b64.indexOf(c);
-        ++i;
-    }
-
-    function code(s, discard, alpha, beta, w1, w2) {
-        s = String(s);
-        var buffer = 0,
-            i = 0,
-            length = s.length,
-            result = '',
-            bitsInBuffer = 0,
-                       tmp;
-
-        while(i < length) {
-            c = s.charCodeAt(i);
-            c = c < 256 ? alpha[c] : -1;
-
-            buffer = (buffer << w1) + c;
-            bitsInBuffer += w1;
-
-            while(bitsInBuffer >= w2) {
-                bitsInBuffer -= w2;
-                tmp = buffer >> bitsInBuffer;
-                result += beta.charAt(tmp);
-                buffer ^= tmp << bitsInBuffer;
-            }
-            ++i;
-        }
-        if(!discard && bitsInBuffer > 0) result += beta.charAt(buffer << (w2 - bitsInBuffer));
-        return result;
-    }
-
-    Plugin = $.base64 = function(dir, input, encode) {
-            return input ? Plugin[dir](input, encode) : dir ? null : this;
-        };
-
-    $.base64.btoa = function(plain) {
-        plain = code(plain, false, r256, b64, 8, 6);
-        return plain + '===='.slice((plain.length % 4) || 4);
-    };
-
-    $.base64.atob = function(coded) {
-        coded = coded.replace(/[^A-Za-z0-9\+\/\=]/g, '');
-        coded = String(coded).split('=');
-        var i = coded.length;
-        do {--i;
-            coded[i] = code(coded[i], true, r64, a256, 6, 8);
-        } while (i > 0);
-        coded = coded.join('');
-        return coded;
-    };
-}(jQuery));
</del></span></pre></div>
<a id="trunksrcwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-includes/script-loader.php (26600 => 26601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-includes/script-loader.php  2013-12-04 03:31:20 UTC (rev 26600)
+++ trunk/src/wp-includes/script-loader.php     2013-12-04 04:12:41 UTC (rev 26601)
</span><span class="lines">@@ -392,8 +392,6 @@
</span><span class="cx">  $scripts->add( 'media-editor', "/wp-includes/js/media-editor$suffix.js", array( 'shortcode', 'media-views' ), false, 1 );
</span><span class="cx">  $scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'media-models' ), false, 1 );
</span><span class="cx"> 
</span><del>-       $scripts->add( 'svg-painter', '/wp-includes/js/svg-painter.js' );
-
</del><span class="cx">   if ( is_admin() ) {
</span><span class="cx">          $scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array('jquery', 'wp-ajax-response'), false, 1 );
</span><span class="cx">          did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array(
</span><span class="lines">@@ -516,6 +514,8 @@
</span><span class="cx">          $scripts->add( 'custom-header', "/wp-admin/js/custom-header.js", array( 'jquery-masonry' ), false, 1 );
</span><span class="cx">          $scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array( 'wp-color-picker', 'media-views' ), false, 1 );
</span><span class="cx">          $scripts->add( 'media-gallery', "/wp-admin/js/media-gallery$suffix.js", array('jquery'), false, 1 );
</span><ins>+
+               $scripts->add( 'svg-painter', '/wp-includes/js/svg-painter.js', array( 'jquery' ), false, 1 );
</ins><span class="cx">   }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>