Completed
Push — trunk ( 1b3e25...df6be1 )
by Justin
04:48
created
includes/types/CMB2_Type_Multi_Base.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 	 * @return string       Generated option element html
20 20
 	 */
21 21
 	public function select_option( $args = array() ) {
22
-		return sprintf( "\t" . '<option value="%s" %s>%s</option>', $args['value'], selected( isset( $args['checked'] ) && $args['checked'], true, false ), $args['label'] ) . "\n";
22
+		return sprintf( "\t" . '<option value="%s" %s>%s</option>', $args[ 'value' ], selected( isset( $args[ 'checked' ] ) && $args[ 'checked' ], true, false ), $args[ 'label' ] ) . "\n";
23 23
 	}
24 24
 
25 25
 	/**
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 			'label' => '',
40 40
 		), $args );
41 41
 
42
-		return sprintf( "\t" . '<li><input%s/> <label for="%s">%s</label></li>' . "\n", $this->concat_attrs( $a, array( 'label' ) ), $a['id'], $a['label'] );
42
+		return sprintf( "\t" . '<li><input%s/> <label for="%s">%s</label></li>' . "\n", $this->concat_attrs( $a, array( 'label' ) ), $a[ 'id' ], $a[ 'label' ] );
43 43
 	}
44 44
 
45 45
 	/**
@@ -51,10 +51,10 @@  discard block
 block discarded – undo
51 51
 	 */
52 52
 	public function list_input_checkbox( $args, $i ) {
53 53
 		$saved_value = $this->field->escaped_value();
54
-		if ( is_array( $saved_value ) && in_array( $args['value'], $saved_value ) ) {
55
-			$args['checked'] = 'checked';
54
+		if ( is_array( $saved_value ) && in_array( $args[ 'value' ], $saved_value ) ) {
55
+			$args[ 'checked' ] = 'checked';
56 56
 		}
57
-		$args['type'] = 'checkbox';
57
+		$args[ 'type' ] = 'checkbox';
58 58
 		return $this->list_input( $args, $i );
59 59
 	}
60 60
 
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
 	public function concat_items( $args = array() ) {
68 68
 		$field = $this->field;
69 69
 
70
-		$method = isset( $args['method'] ) ? $args['method'] : 'select_option';
71
-		unset( $args['method'] );
70
+		$method = isset( $args[ 'method' ] ) ? $args[ 'method' ] : 'select_option';
71
+		unset( $args[ 'method' ] );
72 72
 
73 73
 		$value = $field->escaped_value()
74 74
 			? $field->escaped_value()
@@ -86,12 +86,12 @@  discard block
 block discarded – undo
86 86
 			// Clone args & modify for just this item
87 87
 			$a = $args;
88 88
 
89
-			$a['value'] = $opt_value;
90
-			$a['label'] = $opt_label;
89
+			$a[ 'value' ] = $opt_value;
90
+			$a[ 'label' ] = $opt_label;
91 91
 
92 92
 			// Check if this option is the value of the input
93 93
 			if ( $value == $opt_value ) {
94
-				$a['checked'] = 'checked';
94
+				$a[ 'checked' ] = 'checked';
95 95
 			}
96 96
 
97 97
 			$concatenated_items .= $this->$method( $a, $i++ );
Please login to merge, or discard this patch.
includes/types/CMB2_Type_Select.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 		$attrs = $this->concat_attrs( $a, array( 'desc', 'options' ) );
25 25
 
26 26
 		return $this->rendered(
27
-			sprintf( '<select%s>%s</select>%s', $attrs, $a['options'], $a['desc'] )
27
+			sprintf( '<select%s>%s</select>%s', $attrs, $a[ 'options' ], $a[ 'desc' ] )
28 28
 		);
29 29
 	}
30 30
 }
Please login to merge, or discard this patch.
includes/types/CMB2_Type_Multicheck.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * CMB multicheck field type
4
- *
5
- * @since  2.2.2
6
- *
7
- * @category  WordPress_Plugin
8
- * @package   CMB2
9
- * @author    WebDevStudios
10
- * @license   GPL-2.0+
11
- * @link      http://webdevstudios.com
12
- */
3
+	 * CMB multicheck field type
4
+	 *
5
+	 * @since  2.2.2
6
+	 *
7
+	 * @category  WordPress_Plugin
8
+	 * @package   CMB2
9
+	 * @author    WebDevStudios
10
+	 * @license   GPL-2.0+
11
+	 * @link      http://webdevstudios.com
12
+	 */
13 13
 class CMB2_Type_Multicheck extends CMB2_Type_Radio {
14 14
 
15 15
 	/**
Please login to merge, or discard this patch.
includes/types/CMB2_Type_File.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * CMB file field type
4
- *
5
- * @since  2.2.2
6
- *
7
- * @category  WordPress_Plugin
8
- * @package   CMB2
9
- * @author    WebDevStudios
10
- * @license   GPL-2.0+
11
- * @link      http://webdevstudios.com
12
- */
3
+	 * CMB file field type
4
+	 *
5
+	 * @since  2.2.2
6
+	 *
7
+	 * @category  WordPress_Plugin
8
+	 * @package   CMB2
9
+	 * @author    WebDevStudios
10
+	 * @license   GPL-2.0+
11
+	 * @link      http://webdevstudios.com
12
+	 */
13 13
 class CMB2_Type_File extends CMB2_Type_File_Base {
14 14
 
15 15
 	public function render() {
Please login to merge, or discard this patch.
includes/types/CMB2_Type_Textarea.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 		), $args );
32 32
 
33 33
 		return $this->rendered(
34
-			sprintf( '<textarea%s>%s</textarea>%s', $this->concat_attrs( $a, array( 'desc', 'value' ) ), $a['value'], $a['desc'] )
34
+			sprintf( '<textarea%s>%s</textarea>%s', $this->concat_attrs( $a, array( 'desc', 'value' ) ), $a[ 'value' ], $a[ 'desc' ] )
35 35
 		);
36 36
 	}
37 37
 }
Please login to merge, or discard this patch.
includes/types/CMB2_Type_Taxonomy_Radio.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * CMB taxonomy_radio field type
4
- *
5
- * @since  2.2.2
6
- *
7
- * @category  WordPress_Plugin
8
- * @package   CMB2
9
- * @author    WebDevStudios
10
- * @license   GPL-2.0+
11
- * @link      http://webdevstudios.com
12
- */
3
+	 * CMB taxonomy_radio field type
4
+	 *
5
+	 * @since  2.2.2
6
+	 *
7
+	 * @category  WordPress_Plugin
8
+	 * @package   CMB2
9
+	 * @author    WebDevStudios
10
+	 * @license   GPL-2.0+
11
+	 * @link      http://webdevstudios.com
12
+	 */
13 13
 class CMB2_Type_Taxonomy_Radio extends CMB2_Type_Taxonomy_Base {
14 14
 
15 15
 	public function render() {
Please login to merge, or discard this patch.
includes/types/CMB2_Type_Taxonomy_Select.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * CMB taxonomy_select field type
4
- *
5
- * @since  2.2.2
6
- *
7
- * @category  WordPress_Plugin
8
- * @package   CMB2
9
- * @author    WebDevStudios
10
- * @license   GPL-2.0+
11
- * @link      http://webdevstudios.com
12
- */
3
+	 * CMB taxonomy_select field type
4
+	 *
5
+	 * @since  2.2.2
6
+	 *
7
+	 * @category  WordPress_Plugin
8
+	 * @package   CMB2
9
+	 * @author    WebDevStudios
10
+	 * @license   GPL-2.0+
11
+	 * @link      http://webdevstudios.com
12
+	 */
13 13
 class CMB2_Type_Taxonomy_Select extends CMB2_Type_Taxonomy_Base {
14 14
 
15 15
 	public function render() {
Please login to merge, or discard this patch.
includes/types/CMB2_Type_Text.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * CMB text field type
4
- *
5
- * @since  2.2.2
6
- *
7
- * @category  WordPress_Plugin
8
- * @package   CMB2
9
- * @author    WebDevStudios
10
- * @license   GPL-2.0+
11
- * @link      http://webdevstudios.com
12
- */
3
+	 * CMB text field type
4
+	 *
5
+	 * @since  2.2.2
6
+	 *
7
+	 * @category  WordPress_Plugin
8
+	 * @package   CMB2
9
+	 * @author    WebDevStudios
10
+	 * @license   GPL-2.0+
11
+	 * @link      http://webdevstudios.com
12
+	 */
13 13
 class CMB2_Type_Text extends CMB2_Type_Base {
14 14
 
15 15
 	/**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,12 +50,12 @@
 block discarded – undo
50 50
 			'js_dependencies' => array(),
51 51
 		), $args );
52 52
 
53
-		if ( ! empty( $a['js_dependencies'] ) ) {
54
-			CMB2_JS::add_dependencies( $a['js_dependencies'] );
53
+		if ( ! empty( $a[ 'js_dependencies' ] ) ) {
54
+			CMB2_JS::add_dependencies( $a[ 'js_dependencies' ] );
55 55
 		}
56 56
 
57 57
 		return $this->rendered(
58
-			sprintf( '<input%s/>%s', $this->concat_attrs( $a, array( 'desc', 'js_dependencies' ) ), $a['desc'] )
58
+			sprintf( '<input%s/>%s', $this->concat_attrs( $a, array( 'desc', 'js_dependencies' ) ), $a[ 'desc' ] )
59 59
 		);
60 60
 	}
61 61
 }
Please login to merge, or discard this patch.
includes/types/CMB2_Type_Title.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * CMB title field type
4
- *
5
- * @since  2.2.2
6
- *
7
- * @category  WordPress_Plugin
8
- * @package   CMB2
9
- * @author    WebDevStudios
10
- * @license   GPL-2.0+
11
- * @link      http://webdevstudios.com
12
- */
3
+	 * CMB title field type
4
+	 *
5
+	 * @since  2.2.2
6
+	 *
7
+	 * @category  WordPress_Plugin
8
+	 * @package   CMB2
9
+	 * @author    WebDevStudios
10
+	 * @license   GPL-2.0+
11
+	 * @link      http://webdevstudios.com
12
+	 */
13 13
 class CMB2_Type_Title extends CMB2_Type_Base {
14 14
 
15 15
 	public function render() {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 		) );
22 22
 
23 23
 		return $this->rendered(
24
-			sprintf( '<%1$s class="%2$s">%3$s</%1$s>%4$s', $a['tag'], $a['class'], $a['name'], $a['desc'] )
24
+			sprintf( '<%1$s class="%2$s">%3$s</%1$s>%4$s', $a[ 'tag' ], $a[ 'class' ], $a[ 'name' ], $a[ 'desc' ] )
25 25
 		);
26 26
 	}
27 27
 
Please login to merge, or discard this patch.