Skip to content
Snippets Groups Projects
Select Git revision
  • 4b222b3aef8b7bdeb06602c9b5b70985da5ad650
  • noblogs default
  • noblogs-5.7.1
  • upstream
  • noblogs-5.7
  • noblogs-5.6new
  • upstream5.5.1
  • noblogs28dic
  • upstream28dic
  • noblogs-5.5.1
  • noblogs-5.4.2
  • noblogs-5.4_seconda
  • noblogs-5.4
  • noblogs-7c
  • wp5.2.3p3
  • mergedbconf
  • noblogs-5.7.1
  • noblogs.5.7.0p1
  • noblogs-5.7.0
  • noblogs-5.6p3
  • noblogs5.6p2
  • noblogs-5.6p1
  • noblogs-5.6
  • noblogs-5.4.2p1
  • noblogs-5.4.2
  • noblogs-5.4.1
  • noblogs-5.4
  • noblogs-p5.4
  • noblogs-5.3.2p2
  • noblogs-5.3.2p1
  • noblogs-5.3.2
  • noblogs-5.3
  • noblogs-5.2.3p4
  • noblogs-5.2.3p3
  • noblogs-5.2.3p2
  • noblogs-5.2.3p1
36 results

class-wp-list-util.php

Blame
  • svg-painter.js 5.36 KiB
    /**
     * Attempt to re-color SVG icons used in the admin menu or the toolbar
     *
     */
    
    window.wp = window.wp || {};
    
    wp.svgPainter = ( function( $, window, document, undefined ) {
    	'use strict';
    	var selector, base64, painter,
    		colorscheme = {},
    		elements = [];
    
    	$(document).ready( function() {
    		// detection for browser SVG capability
    		if ( document.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#Image', '1.1' ) ) {
    			$( document.body ).removeClass( 'no-svg' ).addClass( 'svg' );
    			wp.svgPainter.init();
    		}
    	});
    
    	/**
    	 * 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;
    
    		function init() {
    			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 ) {
    			var tmp, length,
    				buffer = 0,
    				i = 0,
    				result = '',
    				bitsInBuffer = 0;
    
    			s = String(s);
    			length = s.length;
    
    			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;