Test Setup Failed
Push — develop ( 5ff539...8b2bca )
by Aristeides
03:52 queued 01:45
created
core/class-kirki-section.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,16 +49,16 @@
 block discarded – undo
49 49
 		// The default class to be used when creating a section.
50 50
 		$section_classname = 'WP_Customize_Section';
51 51
 
52
-		if ( isset( $args['type'] ) && array_key_exists( $args['type'], $this->section_types ) ) {
53
-			$section_classname = $this->section_types[ $args['type'] ];
52
+		if ( isset( $args[ 'type' ] ) && array_key_exists( $args[ 'type' ], $this->section_types ) ) {
53
+			$section_classname = $this->section_types[ $args[ 'type' ] ];
54 54
 		}
55
-		if ( isset( $args['type'] ) && 'kirki-outer' === $args['type'] ) {
56
-			$args['type']      = 'outer';
55
+		if ( isset( $args[ 'type' ] ) && 'kirki-outer' === $args[ 'type' ] ) {
56
+			$args[ 'type' ]      = 'outer';
57 57
 			$section_classname = 'WP_Customize_Section';
58 58
 		}
59 59
 
60 60
 		// Add the section.
61
-		$wp_customize->add_section( new $section_classname( $wp_customize, sanitize_key( $args['id'] ), $args ) );
61
+		$wp_customize->add_section( new $section_classname( $wp_customize, sanitize_key( $args[ 'id' ] ), $args ) );
62 62
 
63 63
 	}
64 64
 }
Please login to merge, or discard this patch.
core/class-kirki-settings.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -67,28 +67,28 @@
 block discarded – undo
67 67
 
68 68
 		// Get the classname we'll be using to create our setting(s).
69 69
 		$classname = false;
70
-		if ( isset( $args['option_type'] ) && array_key_exists( $args['option_type'], $this->setting_types ) ) {
71
-			$classname = $this->setting_types[ $args['option_type'] ];
70
+		if ( isset( $args[ 'option_type' ] ) && array_key_exists( $args[ 'option_type' ], $this->setting_types ) ) {
71
+			$classname = $this->setting_types[ $args[ 'option_type' ] ];
72 72
 		}
73
-		if ( ! isset( $args['type'] ) || ! array_key_exists( $args['type'], $this->setting_types ) ) {
74
-			$args['type'] = 'default';
73
+		if ( ! isset( $args[ 'type' ] ) || ! array_key_exists( $args[ 'type' ], $this->setting_types ) ) {
74
+			$args[ 'type' ] = 'default';
75 75
 		}
76
-		$classname = ! $classname ? $this->setting_types[ $args['type'] ] : $classname;
76
+		$classname = ! $classname ? $this->setting_types[ $args[ 'type' ] ] : $classname;
77 77
 
78 78
 		// If settings are defined as an array, then we need to go through them
79 79
 		// and call add_setting for each one of them separately.
80
-		if ( isset( $args['settings'] ) && is_array( $args['settings'] ) ) {
80
+		if ( isset( $args[ 'settings' ] ) && is_array( $args[ 'settings' ] ) ) {
81 81
 
82 82
 			// Make sure defaults have been defined.
83
-			if ( ! isset( $args['default'] ) || ! is_array( $args['default'] ) ) {
84
-				$args['default'] = array();
83
+			if ( ! isset( $args[ 'default' ] ) || ! is_array( $args[ 'default' ] ) ) {
84
+				$args[ 'default' ] = array();
85 85
 			}
86
-			foreach ( $args['settings'] as $key => $value ) {
86
+			foreach ( $args[ 'settings' ] as $key => $value ) {
87 87
 				$default = ( isset( $defaults[ $key ] ) ) ? $defaults[ $key ] : '';
88
-				$this->add_setting( $classname, $value, $default, $args['option_type'], $args['capability'], $args['transport'], $args['sanitize_callback'] );
88
+				$this->add_setting( $classname, $value, $default, $args[ 'option_type' ], $args[ 'capability' ], $args[ 'transport' ], $args[ 'sanitize_callback' ] );
89 89
 			}
90 90
 		}
91
-		$this->add_setting( $classname, $args['settings'], $args['default'], $args['option_type'], $args['capability'], $args['transport'], $args['sanitize_callback'] );
91
+		$this->add_setting( $classname, $args[ 'settings' ], $args[ 'default' ], $args[ 'option_type' ], $args[ 'capability' ], $args[ 'transport' ], $args[ 'sanitize_callback' ] );
92 92
 	}
93 93
 
94 94
 	/**
Please login to merge, or discard this patch.
class-kirki-autoload.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -89,23 +89,23 @@  discard block
 block discarded – undo
89 89
 		$name_parts = explode( '_', str_replace( 'Kirki_', '', $class_name ) );
90 90
 
91 91
 		// Handle modules loading.
92
-		if ( isset( $name_parts[0] ) && 'Modules' === $name_parts[0] ) {
92
+		if ( isset( $name_parts[ 0 ] ) && 'Modules' === $name_parts[ 0 ] ) {
93 93
 			$path    = dirname( __FILE__ ) . '/modules/';
94 94
 			$path   .= strtolower( str_replace( '_', '-', str_replace( 'Kirki_Modules_', '', $class_name ) ) ) . '/';
95
-			$paths[] = $path . $filename;
95
+			$paths[ ] = $path . $filename;
96 96
 		}
97 97
 
98
-		if ( isset( $name_parts[0] ) ) {
98
+		if ( isset( $name_parts[ 0 ] ) ) {
99 99
 
100 100
 			// Handle controls loading.
101
-			if ( 'Control' === $name_parts[0] || 'Settings' === $name_parts[0] ) {
101
+			if ( 'Control' === $name_parts[ 0 ] || 'Settings' === $name_parts[ 0 ] ) {
102 102
 				$path    = dirname( __FILE__ ) . '/controls/php/';
103
-				$paths[] = $path . $filename;
103
+				$paths[ ] = $path . $filename;
104 104
 			}
105 105
 		}
106 106
 
107
-		$paths[] = dirname( __FILE__ ) . '/core/' . $filename;
108
-		$paths[] = dirname( __FILE__ ) . '/lib/' . $filename;
107
+		$paths[ ] = dirname( __FILE__ ) . '/core/' . $filename;
108
+		$paths[ ] = dirname( __FILE__ ) . '/lib/' . $filename;
109 109
 
110 110
 		$substr   = str_replace( 'Kirki_', '', $class_name );
111 111
 		$exploded = explode( '_', $substr );
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
 		$previous_path = '';
115 115
 		for ( $i = 0; $i < $levels; $i++ ) {
116
-			$paths[]        = dirname( __FILE__ ) . '/' . $previous_path . strtolower( $exploded[ $i ] ) . '/' . $filename;
116
+			$paths[ ]        = dirname( __FILE__ ) . '/' . $previous_path . strtolower( $exploded[ $i ] ) . '/' . $filename;
117 117
 			$previous_path .= strtolower( $exploded[ $i ] ) . '/';
118 118
 		}
119 119
 		return $paths;
Please login to merge, or discard this patch.