@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * number Customizer Control. |
|
4 | - * |
|
5 | - * @package Kirki |
|
6 | - * @subpackage Controls |
|
7 | - * @copyright Copyright (c) 2015, Aristeides Stathopoulos |
|
8 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
9 | - * @since 1.0 |
|
10 | - */ |
|
3 | + * number Customizer Control. |
|
4 | + * |
|
5 | + * @package Kirki |
|
6 | + * @subpackage Controls |
|
7 | + * @copyright Copyright (c) 2015, Aristeides Stathopoulos |
|
8 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
9 | + * @since 1.0 |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | // Exit if accessed directly |
13 | 13 | if ( ! defined( 'ABSPATH' ) ) { |
@@ -7,10 +7,10 @@ |
||
7 | 7 | die( 'File can\'t be accessed directly' ); |
8 | 8 | } |
9 | 9 | /** |
10 | - * Make sure we set the correct MIME type |
|
11 | - */ |
|
10 | + * Make sure we set the correct MIME type |
|
11 | + */ |
|
12 | 12 | header( 'Content-Type: text/css' ); |
13 | 13 | /** |
14 | - * Echo the styles |
|
15 | - */ |
|
14 | + * Echo the styles |
|
15 | + */ |
|
16 | 16 | echo Kirki_Styles_Frontend::loop_controls(); |
@@ -1,15 +1,15 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Color Calculations class for Kirki |
|
4 | - * Initially built for the Shoestrap-3 theme and then tweaked for Kirki. |
|
5 | - * |
|
6 | - * @package Kirki |
|
7 | - * @category Core |
|
8 | - * @author Aristeides Stathopoulos |
|
9 | - * @copyright Copyright (c) 2015, Aristeides Stathopoulos |
|
10 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
11 | - * @since 1.0 |
|
12 | - */ |
|
3 | + * Color Calculations class for Kirki |
|
4 | + * Initially built for the Shoestrap-3 theme and then tweaked for Kirki. |
|
5 | + * |
|
6 | + * @package Kirki |
|
7 | + * @category Core |
|
8 | + * @author Aristeides Stathopoulos |
|
9 | + * @copyright Copyright (c) 2015, Aristeides Stathopoulos |
|
10 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
11 | + * @since 1.0 |
|
12 | + */ |
|
13 | 13 | |
14 | 14 | // Exit if accessed directly |
15 | 15 | if ( ! defined( 'ABSPATH' ) ) { |
@@ -98,7 +98,7 @@ |
||
98 | 98 | * |
99 | 99 | * @param string The rgba color formatted like rgba(r,g,b,a) |
100 | 100 | * |
101 | - * @return string The alpha value of the color. |
|
101 | + * @return integer The alpha value of the color. |
|
102 | 102 | */ |
103 | 103 | public static function get_alpha_from_rgba( $color ) { |
104 | 104 | $obj = kirki_wp_color( $color ); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * Build the field. |
88 | 88 | * We're merging with the original field here, so any extra properties are inherited. |
89 | 89 | */ |
90 | - $fields[ $property_setting ] = array_merge( $field, array( |
|
90 | + $fields[$property_setting] = array_merge( $field, array( |
|
91 | 91 | 'type' => $type, |
92 | 92 | 'label' => $label, |
93 | 93 | 'settings' => $property_setting, |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | 'description' => $description, |
99 | 99 | 'default' => $value, |
100 | 100 | 'id' => Kirki_Field_Sanitize::sanitize_id( array( 'settings' => Kirki_Field_Sanitize::sanitize_settings( array( 'settings' => $field['settings'] . '_' . $setting ) ) ) ), |
101 | - 'choices' => isset( $choices[ $key ] ) ? $choices[ $key ] : array(), |
|
101 | + 'choices' => isset( $choices[$key] ) ? $choices[$key] : array(), |
|
102 | 102 | 'output' => ( '' != $field['output'] ) ? array( |
103 | 103 | array( |
104 | 104 | 'element' => $field['output'], |
@@ -46,8 +46,9 @@ |
||
46 | 46 | parent::to_json(); |
47 | 47 | |
48 | 48 | $this->json['choicesLength'] = 0; |
49 | - if ( is_array( $this->choices ) && count( $this->choices ) ) |
|
50 | - $this->json['choicesLength'] = count( $this->choices ); |
|
49 | + if ( is_array( $this->choices ) && count( $this->choices ) ) { |
|
50 | + $this->json['choicesLength'] = count( $this->choices ); |
|
51 | + } |
|
51 | 52 | |
52 | 53 | $values = $this->value() == '' ? array_keys( $this->choices ) : $this->value(); |
53 | 54 | $filtered_values = array(); |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * sortable Customizer Control. |
|
4 | - * |
|
5 | - * @package Kirki |
|
6 | - * @subpackage Controls |
|
7 | - * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
8 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
9 | - * @since 1.0 |
|
10 | - */ |
|
3 | + * sortable Customizer Control. |
|
4 | + * |
|
5 | + * @package Kirki |
|
6 | + * @subpackage Controls |
|
7 | + * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
8 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
9 | + * @since 1.0 |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | // Exit if accessed directly |
13 | 13 | if ( ! defined( 'ABSPATH' ) ) { |
@@ -79,7 +79,7 @@ |
||
79 | 79 | $class_name = 'WP_Customize_Control'; |
80 | 80 | // Get the classname from the array of control classnames |
81 | 81 | if ( array_key_exists( $args['type'], self::$control_types ) ) { |
82 | - $class_name = self::$control_types[ $args['type'] ]; |
|
82 | + $class_name = self::$control_types[$args['type']]; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | return $class_name; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $args['active_callback'] = ( isset( $args['required'] ) ) ? array( 'Kirki_Active_Callback', 'evaluate' ) : '__return_true'; |
68 | 68 | } |
69 | 69 | |
70 | - self::$panels[ $args['id'] ] = $args; |
|
70 | + self::$panels[$args['id']] = $args; |
|
71 | 71 | |
72 | 72 | } |
73 | 73 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $args['active_callback'] = ( isset( $args['required'] ) ) ? array( 'Kirki_Active_Callback', 'evaluate' ) : '__return_true'; |
89 | 89 | } |
90 | 90 | |
91 | - self::$sections[ $args['id'] ] = $args; |
|
91 | + self::$sections[$args['id']] = $args; |
|
92 | 92 | |
93 | 93 | } |
94 | 94 |
@@ -1,16 +1,16 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * The Kirki API class. |
|
4 | - * Takes care of adding panels, sections & fields to the customizer. |
|
5 | - * For documentation please see https://github.com/aristath/kirki/wiki |
|
6 | - * |
|
7 | - * @package Kirki |
|
8 | - * @category Core |
|
9 | - * @author Aristeides Stathopoulos |
|
10 | - * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
11 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
12 | - * @since 1.0 |
|
13 | - */ |
|
3 | + * The Kirki API class. |
|
4 | + * Takes care of adding panels, sections & fields to the customizer. |
|
5 | + * For documentation please see https://github.com/aristath/kirki/wiki |
|
6 | + * |
|
7 | + * @package Kirki |
|
8 | + * @category Core |
|
9 | + * @author Aristeides Stathopoulos |
|
10 | + * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
11 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
12 | + * @since 1.0 |
|
13 | + */ |
|
14 | 14 | |
15 | 15 | // Exit if accessed directly |
16 | 16 | if ( ! defined( 'ABSPATH' ) ) { |
@@ -50,9 +50,9 @@ |
||
50 | 50 | // Make sure that every row is an array, not an object |
51 | 51 | foreach ( $sanitized as $key => $_value ) { |
52 | 52 | if ( empty( $_value ) ) { |
53 | - unset( $sanitized[ $key ] ); |
|
53 | + unset( $sanitized[$key] ); |
|
54 | 54 | } else { |
55 | - $sanitized[ $key ] = (array) $_value; |
|
55 | + $sanitized[$key] = (array) $_value; |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 |
@@ -1,13 +1,13 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Repeater Customizer Setting. |
|
4 | - * |
|
5 | - * @package Kirki |
|
6 | - * @subpackage Controls |
|
7 | - * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
8 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
9 | - * @since 1.0 |
|
10 | - */ |
|
3 | + * Repeater Customizer Setting. |
|
4 | + * |
|
5 | + * @package Kirki |
|
6 | + * @subpackage Controls |
|
7 | + * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
8 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
9 | + * @since 1.0 |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | // Exit if accessed directly |
13 | 13 | if ( ! defined( 'ABSPATH' ) ) { |
@@ -46,7 +46,7 @@ |
||
46 | 46 | // Allow empty value as the config ID by setting the id to global. |
47 | 47 | $config_id = ( '' == $config_id ) ? 'global' : $config_id; |
48 | 48 | // Set the config |
49 | - Kirki::$config[ $config_id ] = array_merge( $this->default_args, $args ); |
|
49 | + Kirki::$config[$config_id] = array_merge( $this->default_args, $args ); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |