@@ -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(); |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | * |
| 88 | 88 | * @param string $handle |
| 89 | 89 | * @param string $file |
| 90 | - * @param array $deps |
|
| 90 | + * @param string[] $deps |
|
| 91 | 91 | */ |
| 92 | 92 | public static function enqueue_customizer_control_script( $handle, $file = null, $deps = array(), $in_footer = false ) { |
| 93 | 93 | if ( ( false !== strpos( $file, 'controls/' ) && Kirki_Toolkit::kirki_debug() ) || false === strpos( $file, 'controls/' ) ) { |
@@ -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 ); |
@@ -205,6 +205,9 @@ |
||
| 205 | 205 | return $raw_value . $unit_used; |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | + /** |
|
| 209 | + * @param string $value |
|
| 210 | + */ |
|
| 208 | 211 | public static function filter_number( $value ) { |
| 209 | 212 | return filter_var( $value, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION ); |
| 210 | 213 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | * brightness |
| 94 | 94 | * @param $value int|float|string the new value |
| 95 | 95 | * |
| 96 | - * @return object|null |
|
| 96 | + * @return ariColor|null |
|
| 97 | 97 | */ |
| 98 | 98 | public function getNew( $property = '', $value = '' ) { |
| 99 | 99 | // Check if we're changing any of the rgba values |
@@ -129,6 +129,7 @@ discard block |
||
| 129 | 129 | * Figure out what mode we're using. |
| 130 | 130 | * |
| 131 | 131 | * @param string|array |
| 132 | + * @param string $color |
|
| 132 | 133 | * |
| 133 | 134 | * @return string |
| 134 | 135 | */ |
@@ -156,6 +156,9 @@ |
||
| 156 | 156 | ); |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | + /** |
|
| 160 | + * @param string $fontname |
|
| 161 | + */ |
|
| 159 | 162 | public static function is_google_font( $fontname ) { |
| 160 | 163 | if ( array_key_exists( $fontname, self::$google_fonts ) ) { |
| 161 | 164 | return true; |