Completed
Push — develop ( 541439...b39672 )
by Aristeides
07:20 queued 03:12
created

Kirki_Output_Field_Image_Array   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A process_value() 0 6 2
1
<?php
2
/**
3
 * Handles CSS output for typography fields.
4
 *
5
 * @package     Kirki
6
 * @subpackage  Controls
7
 * @copyright   Copyright (c) 2017, Aristeides Stathopoulos
8
 * @license     http://opensource.org/licenses/https://opensource.org/licenses/MIT
9
 * @since       2.2.0
10
 */
11
12
/**
13
 * Output overrides.
14
 */
15
class Kirki_Output_Field_Image_Array extends Kirki_Output {
16
17
	/**
18
	 * Returns the value.
19
	 *
20
	 * @access protected
21
	 * @param string|array $value The value.
22
	 * @param array        $output The field "output".
23
	 * @return string|array
24
	 */
25
	protected function process_value( $value, $output ) {
26
		if ( isset( $value['url'] ) ) {
27
			return $value['url'];
28
		}
29
		return '';
30
	}
31
}
32