Completed
Push — develop ( 0ed590...d2494e )
by Aristeides
02:46
created

Kirki_Modules_Resize   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A enqueue_scripts() 0 6 1
1
<?php
0 ignored issues
show
Coding Style introduced by
File has mixed line endings; this may cause incorrect results
Loading history...
Coding Style introduced by
End of line character is invalid; expected "\n" but found "\r\n"
Loading history...
2
/**
3
 * Allows resizing the customizer pane.
4
 *
5
 * @package     Kirki
6
 * @category    Modules
7
 * @author      Aristeides Stathopoulos
8
 * @copyright   Copyright (c) 2016, Aristeides Stathopoulos
9
 * @license     http://opensource.org/licenses/https://opensource.org/licenses/MIT
10
 * @since       3.0.0
11
 */
12
13
/**
14
 * The Kirki_Modules_Resize object.
15
 */
16
class Kirki_Modules_Resize {
17
18
	/**
19
	 * Constructor.
20
	 *
21
	 * @access public
22
	 * @since 3.0.0
23
	 */
24
	public function __construct() {
25
26
		add_action( 'customize_controls_print_scripts', array( $this, 'enqueue_scripts' ) );
27
	}
28
29
	/**
30
	 * Enqueue scripts.
31
	 *
32
	 * @access public
33
	 * @since 3.0.0
34
	 */
35
	public function enqueue_scripts() {
36
37
		wp_enqueue_script( 'kirki-customizer-resize', trailingslashit( Kirki::$url ) . 'modules/resize/resize.js', array( 'jquery-ui-resizable' ) );
38
		wp_enqueue_style( 'kirki-customizer-resize', trailingslashit( Kirki::$url ) . 'modules/resize/resize.css' );
39
40
	}
41
}
42