Passed
Push — master ( e0ac9d...715f03 )
by Paul
04:37
created

GLSR.ColorPicker   A

Complexity

Conditions 1
Paths 2

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 2
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
/** global: GLSR, jQuery */
2
;(function( $ ) {
3
4
	'use strict';
5
6
	GLSR.ColorPicker = function() {
7
		if( typeof $.wp !== 'object' || typeof $.wp.wpColorPicker !== 'function' )return;
8
		$( document ).find( 'input[type=text].color-picker-hex' ).each( function() {
9
			$( this ).wpColorPicker( $( this ).data( 'colorpicker' ) || {} );
10
		});
11
	};
12
})( jQuery );
13