@@ -14,7 +14,7 @@ |
||
| 14 | 14 | |
| 15 | 15 | public function render() { |
| 16 | 16 | |
| 17 | - $this->field->args['default'] = $this->field->get_default() |
|
| 17 | + $this->field->args[ 'default' ] = $this->field->get_default() |
|
| 18 | 18 | ? $this->field->get_default() |
| 19 | 19 | : cmb2_utils()->timezone_string(); |
| 20 | 20 | |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | ); |
| 37 | 37 | |
| 38 | 38 | if ( is_array( $saved_terms ) && in_array( $term->slug, $saved_terms ) ) { |
| 39 | - $args['checked'] = 'checked'; |
|
| 39 | + $args[ 'checked' ] = 'checked'; |
|
| 40 | 40 | } |
| 41 | 41 | $options .= $this->types->list_input( $args, $i ); |
| 42 | 42 | $i++; |
@@ -16,7 +16,7 @@ discard block |
||
| 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 | $i = 1; |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | if ( ! $terms ) { |
| 25 | 25 | $options .= sprintf( '<li><label>%s</label></li>', esc_html( $this->types->_text( 'no_terms_text', __( 'No terms', 'cmb2' ) ) ) ); |
| 26 | 26 | } else { |
| 27 | - $option_none = $field->args( 'show_option_none' ); |
|
| 27 | + $option_none = $field->args( 'show_option_none' ); |
|
| 28 | 28 | if ( ! empty( $option_none ) ) { |
| 29 | 29 | |
| 30 | 30 | $field_id = $this->_id(); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | 'label' => $option_none, |
| 55 | 55 | ); |
| 56 | 56 | if ( $saved_term == $option_none_value ) { |
| 57 | - $args['checked'] = 'checked'; |
|
| 57 | + $args[ 'checked' ] = 'checked'; |
|
| 58 | 58 | } |
| 59 | 59 | $options .= $this->list_input( $args, $i ); |
| 60 | 60 | $i++; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | ); |
| 68 | 68 | |
| 69 | 69 | if ( $saved_term == $term->slug ) { |
| 70 | - $args['checked'] = 'checked'; |
|
| 70 | + $args[ 'checked' ] = 'checked'; |
|
| 71 | 71 | } |
| 72 | 72 | $options .= $this->list_input( $args, $i ); |
| 73 | 73 | $i++; |
@@ -47,7 +47,7 @@ |
||
| 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 ); |
@@ -20,7 +20,7 @@ |
||
| 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 | |
@@ -30,8 +30,8 @@ discard block |
||
| 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 |
||
| 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 ); |
@@ -46,7 +46,7 @@ |
||
| 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 | } |
@@ -15,7 +15,6 @@ |
||
| 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() { |
@@ -24,7 +24,7 @@ |
||
| 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 | } |