Completed
Push — trunk ( 1b3e25...df6be1 )
by Justin
04:48
created
includes/types/CMB2_Type_File.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 		$output     = '';
22 22
 
23 23
 		// if options array and 'url' => false, then hide the url field
24
-		$input_type = array_key_exists( 'url', $options ) && false === $options['url'] ? 'hidden' : 'text';
24
+		$input_type = array_key_exists( 'url', $options ) && false === $options[ 'url' ] ? 'hidden' : 'text';
25 25
 
26 26
 		$output .= parent::render( array(
27 27
 			'type'  => $input_type,
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 		// Reset field args for attachment ID
43 43
 		$args = $field->args();
44 44
 		// If we're looking at a file in a group, we need to get the non-prefixed id
45
-		$args['id'] = ( $field->group ? $field->args( '_id' ) : $cached_id ) . '_id';
46
-		unset( $args['_id'], $args['_name'] );
45
+		$args[ 'id' ] = ( $field->group ? $field->args( '_id' ) : $cached_id ) . '_id';
46
+		unset( $args[ '_id' ], $args[ '_name' ] );
47 47
 
48 48
 		// And get new field object
49 49
 		$this->types->field = $field = new CMB2_Field( array(
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 				if ( $_id_value ) {
76 76
 					$image = wp_get_attachment_image( $_id_value, $img_size, null, array( 'class' => 'cmb-file-field-image' ) );
77 77
 				} else {
78
-					$size = is_array( $img_size ) ? $img_size[0] : 350;
78
+					$size = is_array( $img_size ) ? $img_size[ 0 ] : 350;
79 79
 					$image = '<img style="max-width: ' . absint( $size ) . 'px; width: 100%; height: auto;" src="' . $meta_value . '" alt="" />';
80 80
 				}
81 81
 
Please login to merge, or discard this 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_Taxonomy_Select.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@
 block discarded – undo
16 16
 		$field = $this->field;
17 17
 		$names = $this->get_object_terms();
18 18
 
19
-		$saved_term = is_wp_error( $names ) || empty( $names ) ? $field->get_default() : $names[key( $names )]->slug;
19
+		$saved_term = is_wp_error( $names ) || empty( $names ) ? $field->get_default() : $names[ key( $names ) ]->slug;
20 20
 		$terms      = get_terms( $field->args( 'taxonomy' ), 'hide_empty=0' );
21 21
 		$options    = '';
22 22
 
23
-		$option_none  = $field->args( 'show_option_none' );
23
+		$option_none = $field->args( 'show_option_none' );
24 24
 		if ( ! empty( $option_none ) ) {
25 25
 
26 26
 			$field_id = $this->_id();
Please login to merge, or discard this 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_Checkbox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 			: $this->is_checked;
48 48
 
49 49
 		if ( $is_checked ) {
50
-			$defaults['checked'] = 'checked';
50
+			$defaults[ 'checked' ] = 'checked';
51 51
 		}
52 52
 
53 53
 		$args = $this->parse_args( 'checkbox', $defaults );
Please login to merge, or discard this patch.
includes/types/CMB2_Type_Text_Date.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 			'js_dependencies' => array( 'jquery-ui-core', 'jquery-ui-datepicker' ),
21 21
 		) );
22 22
 
23
-		if ( false === strpos( $args['class'], 'timepicker' ) ) {
23
+		if ( false === strpos( $args[ 'class' ], 'timepicker' ) ) {
24 24
 			$this->parse_picker_options( 'date' );
25 25
 		}
26 26
 
Please login to merge, or discard this patch.
includes/types/CMB2_Type_Picker_Base.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 			if ( $update ) {
31 31
 				$atts = $this->field->args( 'attributes' );
32 32
 			} else {
33
-				$atts = isset( $args['attributes'] )
34
-					? $args['attributes']
33
+				$atts = isset( $args[ 'attributes' ] )
34
+					? $args[ 'attributes' ]
35 35
 					: $atts;
36 36
 			}
37 37
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 		}
48 48
 
49 49
 		if ( $update ) {
50
-			$this->field->args['attributes'] = $atts;
50
+			$this->field->args[ 'attributes' ] = $atts;
51 51
 		}
52 52
 
53 53
 		return array_merge( $args, $atts );
Please login to merge, or discard this patch.
includes/types/CMB2_Type_Radio.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 	}
47 47
 
48 48
 	protected function ul( $a ) {
49
-		return sprintf( '<ul class="%s">%s</ul>%s', $a['class'], $a['options'], $a['desc'] );
49
+		return sprintf( '<ul class="%s">%s</ul>%s', $a[ 'class' ], $a[ 'options' ], $a[ 'desc' ] );
50 50
 	}
51 51
 
52 52
 }
Please login to merge, or discard this patch.
includes/types/CMB2_Type_Textarea_Code.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
15 15
 	/**
16 16
 	 * Handles outputting a 'wysiwyg' element
17 17
 	 * @since  1.1.0
18
-	 * @param  array  $args Override arguments
19 18
 	 * @return string       Form wysiwyg element
20 19
 	 */
21 20
 	public function render() {
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.