PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-admin
/
js
/** * Attempt to re-color SVG icons used in the admin menu or the toolbar * * @output wp-admin/js/svg-painter.js */ window.wp = window.wp || {}; wp.svgPainter = ( function( $, window, document, undefined ) { 'use strict'; var selector, painter, colorscheme = {}, elements = []; $( function() { wp.svgPainter.init(); }); return { init: function() { painter = this; selector = $( '#adminmenu .wp-menu-image, #wpadminbar .ab-item' ); painter.setColors(); painter.findElements(); painter.paint(); }, setColors: function( colors ) { if ( typeof colors === 'undefined' && typeof window._wpColorScheme !== 'undefined' ) { colors = window._wpColorScheme; } if ( colors && colors.icons && colors.icons.base && colors.icons.current && colors.icons.focus ) { colorscheme = colors.icons; } }, findElements: function() { selector.each( function() { var $this = $(this), bgImage = $this.css( 'background-image' ); if ( bgImage && bgImage.indexOf( 'data:image/svg+xml;base64' ) != -1 ) { elements.push( $this ); } }); }, paint: function() { // Loop through all elements. $.each( elements, function( index, $element ) { var $menuitem = $element.parent().parent(); if ( $menuitem.hasClass( 'current' ) || $menuitem.hasClass( 'wp-has-current-submenu' ) ) { // Paint icon in 'current' color. painter.paintElement( $element, 'current' ); } else { // Paint icon in base color. painter.paintElement( $element, 'base' ); // Set hover callbacks. $menuitem.on( 'mouseenter', function() { painter.paintElement( $element, 'focus' ); } ).on( 'mouseleave', function() { // Match the delay from hoverIntent. window.setTimeout( function() { painter.paintElement( $element, 'base' ); }, 100 ); } ); } }); }, paintElement: function( $element, colorType ) { var xml, encoded, color; if ( ! colorType || ! colorscheme.hasOwnProperty( colorType ) ) { return; } color = colorscheme[ colorType ]; // Only accept hex colors: #101 or #101010. if ( ! color.match( /^(#[0-9a-f]{3}|#[0-9a-f]{6})$/i ) ) { return; } xml = $element.data( 'wp-ui-svg-' + color ); if ( xml === 'none' ) { return; } if ( ! xml ) { encoded = $element.css( 'background-image' ).match( /.+data:image\/svg\+xml;base64,([A-Za-z0-9\+\/\=]+)/ ); if ( ! encoded || ! encoded[1] ) { $element.data( 'wp-ui-svg-' + color, 'none' ); return; } try { xml = window.atob( encoded[1] ); } catch ( error ) {} if ( xml ) { // Replace `fill` attributes. xml = xml.replace( /fill="(.+?)"/g, 'fill="' + color + '"'); // Replace `style` attributes. xml = xml.replace( /style="(.+?)"/g, 'style="fill:' + color + '"'); // Replace `fill` properties in `<style>` tags. xml = xml.replace( /fill:.*?;/g, 'fill: ' + color + ';'); xml = window.btoa( xml ); $element.data( 'wp-ui-svg-' + color, xml ); } else { $element.data( 'wp-ui-svg-' + color, 'none' ); return; } } $element.attr( 'style', 'background-image: url("data:image/svg+xml;base64,' + xml + '") !important;' ); } }; })( jQuery, window, document );
[-] tags-box.min.js
[edit]
[-] auth-app.min.js
[edit]
[-] user-suggest.min.js
[edit]
[-] customize-widgets.js
[edit]
[-] xfn.js
[edit]
[-] theme.js
[edit]
[-] user-suggest.js
[edit]
[-] theme-plugin-editor.min.js
[edit]
[-] tags-suggest.js
[edit]
[-] media.js
[edit]
[-] custom-header.js
[edit]
[-] site-health.min.js
[edit]
[-] media.min.js
[edit]
[-] set-post-thumbnail.min.js
[edit]
[-] nav-menu.js
[edit]
[-] site-icon.min.js
[edit]
[-] dashboard.js
[edit]
[-] inline-edit-tax.js
[edit]
[-] post.js
[edit]
[-] user-profile.min.js
[edit]
[-] widgets.js
[edit]
[-] password-toggle.js
[edit]
[-] application-passwords.min.js
[edit]
[-] updates.js
[edit]
[-] svg-painter.min.js
[edit]
[-] revisions.min.js
[edit]
[-] word-count.js
[edit]
[-] customize-controls.min.js
[edit]
[-] privacy-tools.min.js
[edit]
[-] user-profile.js
[edit]
[-] editor.js
[edit]
[-] application-passwords.js
[edit]
[-] tags.min.js
[edit]
[-] nav-menu.min.js
[edit]
[-] media-upload.min.js
[edit]
[-] tags-suggest.min.js
[edit]
[-] gallery.min.js
[edit]
[-] revisions.js
[edit]
[-] password-toggle.min.js
[edit]
[-] accordion.min.js
[edit]
[-] media-gallery.min.js
[edit]
[-] theme-plugin-editor.js
[edit]
[-] image-edit.js
[edit]
[-] image-edit.min.js
[edit]
[-] svg-painter.js
[edit]
[-] theme.min.js
[edit]
[-] password-strength-meter.js
[edit]
[-] iris.min.js
[edit]
[-] custom-background.min.js
[edit]
[-] customize-nav-menus.min.js
[edit]
[-] common.js
[edit]
[-] xfn.min.js
[edit]
[-] code-editor.js
[edit]
[-] media-upload.js
[edit]
[-] auth-app.js
[edit]
[-] customize-widgets.min.js
[edit]
[-] link.min.js
[edit]
[-] inline-edit-post.min.js
[edit]
[-] color-picker.js
[edit]
[-] set-post-thumbnail.js
[edit]
[-] code-editor.min.js
[edit]
[-] privacy-tools.js
[edit]
[-] comment.js
[edit]
[-] dashboard.min.js
[edit]
[-] postbox.min.js
[edit]
[-] media-gallery.js
[edit]
[-] password-strength-meter.min.js
[edit]
[-] custom-background.js
[edit]
[-] comment.min.js
[edit]
[-] common.min.js
[edit]
[-] plugin-install.min.js
[edit]
[-] accordion.js
[edit]
[-] customize-controls.js
[edit]
[-] editor-expand.min.js
[edit]
[-] gallery.js
[edit]
[-] inline-edit-tax.min.js
[edit]
[-] edit-comments.js
[edit]
[-] word-count.min.js
[edit]
[-] language-chooser.min.js
[edit]
[-] farbtastic.js
[edit]
[+]
..
[-] editor.min.js
[edit]
[-] postbox.js
[edit]
[-] site-icon.js
[edit]
[-] tags-box.js
[edit]
[-] edit-comments.min.js
[edit]
[-] customize-nav-menus.js
[edit]
[-] editor-expand.js
[edit]
[-] language-chooser.js
[edit]
[-] site-health.js
[edit]
[-] link.js
[edit]
[-] color-picker.min.js
[edit]
[+]
widgets
[-] inline-edit-post.js
[edit]
[-] updates.min.js
[edit]
[-] widgets.min.js
[edit]
[-] tags.js
[edit]
[-] post.min.js
[edit]
[-] plugin-install.js
[edit]