| @@ -257,13 +257,13 @@ discard block | ||
| 257 | 257 | |
| 258 | 258 | // Get the config arguments, and merge them with the defaults. | 
| 259 | 259 | $config_defaults = ( isset( Kirki::$config['global'] ) ) ? Kirki::$config['global'] : array(); | 
| 260 | -		if ( 'global' !== $this->kirki_config && isset( Kirki::$config[ $this->kirki_config ] ) ) { | |
| 261 | - $config_defaults = Kirki::$config[ $this->kirki_config ]; | |
| 260 | +		if ( 'global' !== $this->kirki_config && isset( Kirki::$config[$this->kirki_config] ) ) { | |
| 261 | + $config_defaults = Kirki::$config[$this->kirki_config]; | |
| 262 | 262 | } | 
| 263 | 263 | $config_defaults = ( is_array( $config_defaults ) ) ? $config_defaults : array(); | 
| 264 | 264 |  		foreach ( $config_defaults as $key => $value ) { | 
| 265 | -			if ( isset( $defaults[ $key ] ) && ! empty( $value ) && $value !== $defaults[ $key ] ) { | |
| 266 | - $defaults[ $key ] = $value; | |
| 265 | +			if ( isset( $defaults[$key] ) && ! empty( $value ) && $value !== $defaults[$key] ) { | |
| 266 | + $defaults[$key] = $value; | |
| 267 | 267 | } | 
| 268 | 268 | } | 
| 269 | 269 | |
| @@ -308,11 +308,11 @@ discard block | ||
| 308 | 308 | // Get all arguments with their values. | 
| 309 | 309 | $args = get_object_vars( $this ); | 
| 310 | 310 |  		foreach ( array_keys( $args ) as $key ) { | 
| 311 | - $args[ $key ] = $this->$key; | |
| 311 | + $args[$key] = $this->$key; | |
| 312 | 312 | } | 
| 313 | 313 | |
| 314 | 314 | // Add the field to the static $fields variable properly indexed. | 
| 315 | - Kirki::$fields[ $this->settings ] = $args; | |
| 315 | + Kirki::$fields[$this->settings] = $args; | |
| 316 | 316 | |
| 317 | 317 | } | 
| 318 | 318 | |
| @@ -333,7 +333,7 @@ discard block | ||
| 333 | 333 | $property_parts = explode( '_', $property ); | 
| 334 | 334 | } | 
| 335 | 335 |  		foreach ( $property_parts as $property_part_k => $property_part_v ) { | 
| 336 | - $property_parts[ $property_part_k ] = ucfirst( $property_part_v ); | |
| 336 | + $property_parts[$property_part_k] = ucfirst( $property_part_v ); | |
| 337 | 337 | } | 
| 338 | 338 | return 'Kirki_Field_Property_' . implode( '_', $property_parts ); | 
| 339 | 339 | } | 
| @@ -429,7 +429,7 @@ discard block | ||
| 429 | 429 |  			if ( ! is_array( $args ) || ! isset( $args['selector'] ) || ! isset( $args['render_callback'] ) || ! is_callable( $args['render_callback'] ) ) { | 
| 430 | 430 | /* translators: %1$s represents the field ID where the error occurs. */ | 
| 431 | 431 | _doing_it_wrong( __METHOD__, sprintf( esc_attr__( '"partial_refresh" invalid entry in field %s', 'kirki' ), esc_attr( $this->settings ) ), '3.0.10' ); | 
| 432 | - unset( $this->partial_refresh[ $id ] ); | |
| 432 | + unset( $this->partial_refresh[$id] ); | |
| 433 | 433 | continue; | 
| 434 | 434 | } | 
| 435 | 435 | } | 
| @@ -457,10 +457,10 @@ discard block | ||
| 457 | 457 | } | 
| 458 | 458 | $settings = array(); | 
| 459 | 459 |  		foreach ( $this->settings as $setting_key => $setting_value ) { | 
| 460 | - $settings[ $setting_key ] = $setting_value; | |
| 460 | + $settings[$setting_key] = $setting_value; | |
| 461 | 461 | // If we're using serialized options then we need to spice this up. | 
| 462 | 462 |  			if ( 'option' === $this->option_type && '' !== $this->option_name && ( false === strpos( $setting_key, '[' ) ) ) { | 
| 463 | -				$settings[ $setting_key ] = "{$this->option_name}[{$setting_value}]"; | |
| 463 | +				$settings[$setting_key] = "{$this->option_name}[{$setting_value}]"; | |
| 464 | 464 | } | 
| 465 | 465 | } | 
| 466 | 466 | $this->settings = $settings; | 
| @@ -585,17 +585,17 @@ discard block | ||
| 585 | 585 | } | 
| 586 | 586 |  		foreach ( $this->output as $key => $output ) { | 
| 587 | 587 |  			if ( empty( $output ) || ! isset( $output['element'] ) ) { | 
| 588 | - unset( $this->output[ $key ] ); | |
| 588 | + unset( $this->output[$key] ); | |
| 589 | 589 | continue; | 
| 590 | 590 | } | 
| 591 | 591 |  			if ( ! isset( $output['sanitize_callback'] ) && isset( $output['callback'] ) ) { | 
| 592 | - $this->output[ $key ]['sanitize_callback'] = $output['callback']; | |
| 592 | + $this->output[$key]['sanitize_callback'] = $output['callback']; | |
| 593 | 593 | } | 
| 594 | 594 | // Convert element arrays to strings. | 
| 595 | 595 |  			if ( isset( $output['element'] ) && is_array( $output['element'] ) ) { | 
| 596 | - $this->output[ $key ]['element'] = array_unique( $this->output[ $key ]['element'] ); | |
| 597 | - sort( $this->output[ $key ]['element'] ); | |
| 598 | - $this->output[ $key ]['element'] = implode( ',', $this->output[ $key ]['element'] ); | |
| 596 | + $this->output[$key]['element'] = array_unique( $this->output[$key]['element'] ); | |
| 597 | + sort( $this->output[$key]['element'] ); | |
| 598 | + $this->output[$key]['element'] = implode( ',', $this->output[$key]['element'] ); | |
| 599 | 599 | } | 
| 600 | 600 | } | 
| 601 | 601 | } |