@@ -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 int|float 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 ); |
@@ -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 | |
@@ -15,11 +15,11 @@ |
||
| 15 | 15 | $fields = Kirki::$fields; |
| 16 | 16 | |
| 17 | 17 | // Make sure the current object matches a registered field. |
| 18 | - if ( ! isset( $object->setting->id ) || ! isset( $fields[ $object->setting->id ] ) ) { |
|
| 18 | + if ( ! isset( $object->setting->id ) || ! isset( $fields[$object->setting->id] ) ) { |
|
| 19 | 19 | return true; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - $current_object = $fields[ $object->setting->id ]; |
|
| 22 | + $current_object = $fields[$object->setting->id]; |
|
| 23 | 23 | |
| 24 | 24 | if ( isset( $current_object['required'] ) ) { |
| 25 | 25 | |
@@ -172,9 +172,9 @@ |
||
| 172 | 172 | * If no callback is defined (false) then just get the value. |
| 173 | 173 | */ |
| 174 | 174 | if ( $variable_callback ) { |
| 175 | - $variables[ $variable_name ] = call_user_func( $field_variable['callback'], Kirki::get_option( $field['settings'] ) ); |
|
| 175 | + $variables[$variable_name] = call_user_func( $field_variable['callback'], Kirki::get_option( $field['settings'] ) ); |
|
| 176 | 176 | } else { |
| 177 | - $variables[ $variable_name ] = Kirki::get_option( $field['settings'] ); |
|
| 177 | + $variables[$variable_name] = Kirki::get_option( $field['settings'] ); |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | } |
@@ -1,11 +1,11 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @package Kirki |
|
| 4 | - * @subpackage Controls |
|
| 5 | - * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
| 6 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
| 7 | - * @since 1.0 |
|
| 8 | - */ |
|
| 3 | + * @package Kirki |
|
| 4 | + * @subpackage Controls |
|
| 5 | + * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
| 6 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
| 7 | + * @since 1.0 |
|
| 8 | + */ |
|
| 9 | 9 | |
| 10 | 10 | // Exit if accessed directly |
| 11 | 11 | if ( ! defined( 'ABSPATH' ) ) { |
@@ -1,16 +1,16 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Enqueue the scripts that are required by the customizer. |
|
| 4 | - * Any additional scripts that are required by individual controls |
|
| 5 | - * are enqueued in the control classes themselves. |
|
| 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 | + * Enqueue the scripts that are required by the customizer. |
|
| 4 | + * Any additional scripts that are required by individual controls |
|
| 5 | + * are enqueued in the control classes themselves. |
|
| 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' ) ) { |
@@ -113,14 +113,14 @@ |
||
| 113 | 113 | $available_variants = array(); |
| 114 | 114 | foreach ( $variants as $variant ) { |
| 115 | 115 | if ( array_key_exists( $variant, $all_variants ) ) { |
| 116 | - $available_variants[] = array( 'id' => $variant, 'label' => $all_variants[ $variant ] ); |
|
| 116 | + $available_variants[] = array( 'id' => $variant, 'label' => $all_variants[$variant] ); |
|
| 117 | 117 | } |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | $available_subsets = array(); |
| 121 | 121 | foreach ( $subsets as $subset ) { |
| 122 | 122 | if ( array_key_exists( $subset, $all_subsets ) ) { |
| 123 | - $available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[ $subset ] ); |
|
| 123 | + $available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[$subset] ); |
|
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | |
@@ -1,14 +1,14 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Helper methods |
|
| 4 | - * |
|
| 5 | - * @package Kirki |
|
| 6 | - * @category Core |
|
| 7 | - * @author Aristeides Stathopoulos |
|
| 8 | - * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
| 9 | - * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
| 10 | - * @since 1.0 |
|
| 11 | - */ |
|
| 3 | + * Helper methods |
|
| 4 | + * |
|
| 5 | + * @package Kirki |
|
| 6 | + * @category Core |
|
| 7 | + * @author Aristeides Stathopoulos |
|
| 8 | + * @copyright Copyright (c) 2016, Aristeides Stathopoulos |
|
| 9 | + * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
|
| 10 | + * @since 1.0 |
|
| 11 | + */ |
|
| 12 | 12 | |
| 13 | 13 | // Exit if accessed directly |
| 14 | 14 | if ( ! defined( 'ABSPATH' ) ) { |
@@ -27,8 +27,8 @@ discard block |
||
| 27 | 27 | } |
| 28 | 28 | $count = count( $args ); |
| 29 | 29 | for ( $i = 1; $i < $count; $i++ ) { |
| 30 | - if ( is_array( $args[ $i ] ) ) { |
|
| 31 | - $array = self::recurse( $array, $args[ $i ] ); |
|
| 30 | + if ( is_array( $args[$i] ) ) { |
|
| 31 | + $array = self::recurse( $array, $args[$i] ); |
|
| 32 | 32 | } |
| 33 | 33 | } |
| 34 | 34 | return $array; |
@@ -37,15 +37,15 @@ discard block |
||
| 37 | 37 | public static function recurse( $array, $array1 ) { |
| 38 | 38 | foreach ( $array1 as $key => $value ) { |
| 39 | 39 | // create new key in $array, if it is empty or not an array |
| 40 | - if ( ! isset( $array[ $key ] ) || ( isset( $array[ $key ] ) && ! is_array( $array[ $key ] ) ) ) { |
|
| 41 | - $array[ $key ] = array(); |
|
| 40 | + if ( ! isset( $array[$key] ) || ( isset( $array[$key] ) && ! is_array( $array[$key] ) ) ) { |
|
| 41 | + $array[$key] = array(); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | // overwrite the value in the base array |
| 45 | 45 | if ( is_array( $value ) ) { |
| 46 | - $value = self::recurse( $array[ $key ], $value ); |
|
| 46 | + $value = self::recurse( $array[$key], $value ); |
|
| 47 | 47 | } |
| 48 | - $array[ $key ] = $value; |
|
| 48 | + $array[$key] = $value; |
|
| 49 | 49 | } |
| 50 | 50 | return $array; |
| 51 | 51 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | // properly format the array. |
| 103 | 103 | $items = array(); |
| 104 | 104 | foreach ( $posts as $post ) { |
| 105 | - $items[ $post->ID ] = $post->post_title; |
|
| 105 | + $items[$post->ID] = $post->post_title; |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | return $items; |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | foreach ( $taxonomies as $taxonomy ) { |
| 120 | 120 | $id = $taxonomy; |
| 121 | 121 | $taxonomy = get_taxonomy( $taxonomy ); |
| 122 | - $items[ $id ] = $taxonomy->labels->name; |
|
| 122 | + $items[$id] = $taxonomy->labels->name; |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | return $items; |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | $post_types = get_post_types( array( 'public' => true ), 'objects' ); |
| 135 | 135 | // Build the array |
| 136 | 136 | foreach ( $post_types as $post_type ) { |
| 137 | - $items[ $post_type->name ] = $post_type->labels->name; |
|
| 137 | + $items[$post_type->name] = $post_type->labels->name; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | return $items; |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $terms = get_terms( $taxonomies ); |
| 150 | 150 | // Build the array |
| 151 | 151 | foreach ( $terms as $term ) { |
| 152 | - $items[ $term->term_id ] = $term->name; |
|
| 152 | + $items[$term->term_id] = $term->name; |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | return $items; |