Completed
Pull Request — develop (#1713)
by Zack
17:42
created
includes/widgets/search-widget/templates/search-field-search_all.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@
 block discarded – undo
6 6
  */
7 7
 $gravityview_view = GravityView_View::getInstance();
8 8
 $view_id = $gravityview_view->getViewId();
9
-$value = $gravityview_view->search_field['value'];
10
-$label = $gravityview_view->search_field['label'];
9
+$value = $gravityview_view->search_field[ 'value' ];
10
+$label = $gravityview_view->search_field[ 'label' ];
11 11
 
12 12
 $html_input_type = RGFormsModel::is_html5_enabled() ? 'search' : 'text';
13 13
 ?>
14 14
 
15 15
 <div class="gv-search-box gv-search-field-text gv-search-field-search_all">
16 16
 	<div class="gv-search">
17
-	<?php if (!gv_empty($label, false, false)) { ?>
18
-		<label for="gv_search_<?php echo $view_id; ?>"><?php echo esc_html($label); ?></label>
17
+	<?php if ( ! gv_empty( $label, false, false ) ) { ?>
18
+		<label for="gv_search_<?php echo $view_id; ?>"><?php echo esc_html( $label ); ?></label>
19 19
 	<?php } ?>
20
-		<p><input type="<?php echo $html_input_type; ?>" name="gv_search" id="gv_search_<?php echo $view_id; ?>" value="<?php echo esc_attr($value); ?>" /></p>
20
+		<p><input type="<?php echo $html_input_type; ?>" name="gv_search" id="gv_search_<?php echo $view_id; ?>" value="<?php echo esc_attr( $value ); ?>" /></p>
21 21
 	</div>
22 22
 </div>
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-radio.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,9 +10,9 @@
 block discarded – undo
10 10
 
11 11
 // Make sure that there are choices to display
12 12
 if (empty($search_field['choices'])) {
13
-    gravityview()->log->debug('search-field-radio.php - No choices for field');
13
+	gravityview()->log->debug('search-field-radio.php - No choices for field');
14 14
 
15
-    return;
15
+	return;
16 16
 }
17 17
 
18 18
 ?>
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,23 +9,23 @@
 block discarded – undo
9 9
 $search_field = $gravityview_view->search_field;
10 10
 
11 11
 // Make sure that there are choices to display
12
-if (empty($search_field['choices'])) {
13
-    gravityview()->log->debug('search-field-radio.php - No choices for field');
12
+if ( empty( $search_field[ 'choices' ] ) ) {
13
+    gravityview()->log->debug( 'search-field-radio.php - No choices for field' );
14 14
 
15 15
     return;
16 16
 }
17 17
 
18 18
 ?>
19 19
 <div class="gv-search-box gv-search-field-radio">
20
-	<?php if (!gv_empty($search_field['label'], false, false)) { ?>
21
-	<label for=search-box-<?php echo esc_attr($search_field['name']); ?>><?php echo esc_html($search_field['label']); ?></label>
20
+	<?php if ( ! gv_empty( $search_field[ 'label' ], false, false ) ) { ?>
21
+	<label for=search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>><?php echo esc_html( $search_field[ 'label' ] ); ?></label>
22 22
 	<?php } ?>
23 23
 	<p>
24
-	<?php foreach ($search_field['choices'] as $choice) { ?>
24
+	<?php foreach ( $search_field[ 'choices' ] as $choice ) { ?>
25 25
 
26
-		<label for="search-box-<?php echo sanitize_html_class($search_field['name'].$choice['value'].$choice['text']); ?>" class="gv-check-radio">
27
-			<input type="radio" name="<?php echo esc_attr($search_field['name']); ?>" value="<?php echo esc_attr($choice['value']); ?>" id="search-box-<?php echo sanitize_html_class($search_field['name'].$choice['value'].$choice['text']); ?>" <?php checked($choice['value'], $search_field['value'], true); ?>>
28
-			<?php echo esc_html($choice['text']); ?>
26
+		<label for="search-box-<?php echo sanitize_html_class( $search_field[ 'name' ] . $choice[ 'value' ] . $choice[ 'text' ] ); ?>" class="gv-check-radio">
27
+			<input type="radio" name="<?php echo esc_attr( $search_field[ 'name' ] ); ?>" value="<?php echo esc_attr( $choice[ 'value' ] ); ?>" id="search-box-<?php echo sanitize_html_class( $search_field[ 'name' ] . $choice[ 'value' ] . $choice[ 'text' ] ); ?>" <?php checked( $choice[ 'value' ], $search_field[ 'value' ], true ); ?>>
28
+			<?php echo esc_html( $choice[ 'text' ] ); ?>
29 29
 		</label>
30 30
 
31 31
 	<?php } ?>
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-link.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@  discard block
 block discarded – undo
13 13
 
14 14
 // Make sure that there are choices to display
15 15
 if (empty($search_field['choices'])) {
16
-    gravityview()->log->debug('search-field-link.php - No choices for field');
16
+	gravityview()->log->debug('search-field-link.php - No choices for field');
17 17
 
18
-    return;
18
+	return;
19 19
 }
20 20
 
21 21
 $links_label = empty($search_field['label']) ? __('Show only:', 'gravityview') : $search_field['label'];
@@ -44,24 +44,24 @@  discard block
 block discarded – undo
44 44
 
45 45
         <?php
46 46
 
47
-        $search_value = \GV\Utils::_GET($search_field['name']);
47
+		$search_value = \GV\Utils::_GET($search_field['name']);
48 48
 
49
-        foreach ($search_field['choices'] as $k => $choice) {
50
-            if (0 != $k) {
51
-                echo esc_html($links_sep);
52
-            }
49
+		foreach ($search_field['choices'] as $k => $choice) {
50
+			if (0 != $k) {
51
+				echo esc_html($links_sep);
52
+			}
53 53
 
54
-            $active = ('' !== $search_value && in_array($search_value, [$choice['text'], $choice['value']])) ? ' class="active"' : false;
54
+			$active = ('' !== $search_value && in_array($search_value, [$choice['text'], $choice['value']])) ? ' class="active"' : false;
55 55
 
56
-            if ($active) {
57
-                $link = remove_query_arg(['pagenum', $search_field['name']], $base_url);
58
-            } else {
59
-                $link = add_query_arg([$search_field['name'] => urlencode($choice['value'])], remove_query_arg(['pagenum'], $base_url));
60
-            } ?>
56
+			if ($active) {
57
+				$link = remove_query_arg(['pagenum', $search_field['name']], $base_url);
58
+			} else {
59
+				$link = add_query_arg([$search_field['name'] => urlencode($choice['value'])], remove_query_arg(['pagenum'], $base_url));
60
+			} ?>
61 61
 
62 62
 			<a href="<?php echo esc_url_raw($link); ?>" <?php echo $active; ?>><?php echo esc_html($choice['text']); ?></a>
63 63
 
64 64
 		<?php
65
-        } ?>
65
+		} ?>
66 66
 	</p>
67 67
 </div>
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@  discard block
 block discarded – undo
12 12
 $base_url = GravityView_Widget_Search::get_search_form_action();
13 13
 
14 14
 // Make sure that there are choices to display
15
-if (empty($search_field['choices'])) {
16
-    gravityview()->log->debug('search-field-link.php - No choices for field');
15
+if ( empty( $search_field[ 'choices' ] ) ) {
16
+    gravityview()->log->debug( 'search-field-link.php - No choices for field' );
17 17
 
18 18
     return;
19 19
 }
20 20
 
21
-$links_label = empty($search_field['label']) ? __('Show only:', 'gravityview') : $search_field['label'];
21
+$links_label = empty( $search_field[ 'label' ] ) ? __( 'Show only:', 'gravityview' ) : $search_field[ 'label' ];
22 22
 
23 23
 /**
24 24
  * @filter `gravityview/extension/search/links_label` Change the label for the "Link" search bar input type
@@ -27,39 +27,39 @@  discard block
 block discarded – undo
27 27
  *
28 28
  * @param string $links_label Default: `Show only:` if search field label is not set. Otherwise, search field label.
29 29
  */
30
-$links_label = apply_filters('gravityview/extension/search/links_label', $links_label);
30
+$links_label = apply_filters( 'gravityview/extension/search/links_label', $links_label );
31 31
 
32 32
 /**
33 33
  * @filter `gravityview/extension/search/links_sep` Change what separates search bar "Link" input type links
34 34
  *
35 35
  * @param string $links_sep Default: `&nbsp;|&nbsp;` Used to connect multiple links
36 36
  */
37
-$links_sep = apply_filters('gravityview/extension/search/links_sep', '&nbsp;|&nbsp;');
37
+$links_sep = apply_filters( 'gravityview/extension/search/links_sep', '&nbsp;|&nbsp;' );
38 38
 
39 39
 ?>
40 40
 
41 41
 <div class="gv-search-box gv-search-field-link gv-search-box-links">
42 42
 	<p>
43
-		<?php echo esc_html($links_label); ?>
43
+		<?php echo esc_html( $links_label ); ?>
44 44
 
45 45
         <?php
46 46
 
47
-        $search_value = \GV\Utils::_GET($search_field['name']);
47
+        $search_value = \GV\Utils::_GET( $search_field[ 'name' ] );
48 48
 
49
-        foreach ($search_field['choices'] as $k => $choice) {
50
-            if (0 != $k) {
51
-                echo esc_html($links_sep);
49
+        foreach ( $search_field[ 'choices' ] as $k => $choice ) {
50
+            if ( 0 != $k ) {
51
+                echo esc_html( $links_sep );
52 52
             }
53 53
 
54
-            $active = ('' !== $search_value && in_array($search_value, [$choice['text'], $choice['value']])) ? ' class="active"' : false;
54
+            $active = ( '' !== $search_value && in_array( $search_value, [ $choice[ 'text' ], $choice[ 'value' ] ] ) ) ? ' class="active"' : false;
55 55
 
56
-            if ($active) {
57
-                $link = remove_query_arg(['pagenum', $search_field['name']], $base_url);
56
+            if ( $active ) {
57
+                $link = remove_query_arg( [ 'pagenum', $search_field[ 'name' ] ], $base_url );
58 58
             } else {
59
-                $link = add_query_arg([$search_field['name'] => urlencode($choice['value'])], remove_query_arg(['pagenum'], $base_url));
59
+                $link = add_query_arg( [ $search_field[ 'name' ] => urlencode( $choice[ 'value' ] ) ], remove_query_arg( [ 'pagenum' ], $base_url ) );
60 60
             } ?>
61 61
 
62
-			<a href="<?php echo esc_url_raw($link); ?>" <?php echo $active; ?>><?php echo esc_html($choice['text']); ?></a>
62
+			<a href="<?php echo esc_url_raw( $link ); ?>" <?php echo $active; ?>><?php echo esc_html( $choice[ 'text' ] ); ?></a>
63 63
 
64 64
 		<?php
65 65
         } ?>
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-submit.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,26 +8,26 @@
 block discarded – undo
8 8
 <div class="gv-search-box gv-search-box-submit">
9 9
 	<?php
10 10
 
11
-    // Output the Clear button, if enabled
12
-    GravityView_Widget_Search::the_clear_search_button();
11
+	// Output the Clear button, if enabled
12
+	GravityView_Widget_Search::the_clear_search_button();
13 13
 
14
-    $args = gv_get_query_args();
14
+	$args = gv_get_query_args();
15 15
 
16
-    foreach ($args as $key => $value) {
17
-        if (is_array($value)) {
18
-            foreach ($value as $k => $v) {
19
-                ?>
16
+	foreach ($args as $key => $value) {
17
+		if (is_array($value)) {
18
+			foreach ($value as $k => $v) {
19
+				?>
20 20
 			<input type="hidden" name="<?php echo esc_attr(sprintf('%s[%s]', $key, $k)); ?>" value="<?php echo esc_attr($v); ?>" />
21 21
 			<?php
22
-            }
23
-        } else {
24
-            ?>
22
+			}
23
+		} else {
24
+			?>
25 25
 		<input type="hidden" name="<?php echo esc_attr($key); ?>" value="<?php echo esc_attr($value); ?>" />
26 26
 		<?php
27
-        }
28
-    }
27
+		}
28
+	}
29 29
 
30
-    ?>
30
+	?>
31 31
 	<input type="hidden" name="mode" value="<?php echo esc_attr($gravityview_view->search_mode); ?>" />
32 32
 	<input type="submit" class="button gv-search-button" id="gv_search_button_<?php echo $view_id; ?>" value="<?php esc_attr_e('Search', 'gravityview'); ?>" />
33 33
 </div>
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,21 +13,21 @@
 block discarded – undo
13 13
 
14 14
     $args = gv_get_query_args();
15 15
 
16
-    foreach ($args as $key => $value) {
17
-        if (is_array($value)) {
18
-            foreach ($value as $k => $v) {
16
+    foreach ( $args as $key => $value ) {
17
+        if ( is_array( $value ) ) {
18
+            foreach ( $value as $k => $v ) {
19 19
                 ?>
20
-			<input type="hidden" name="<?php echo esc_attr(sprintf('%s[%s]', $key, $k)); ?>" value="<?php echo esc_attr($v); ?>" />
20
+			<input type="hidden" name="<?php echo esc_attr( sprintf( '%s[%s]', $key, $k ) ); ?>" value="<?php echo esc_attr( $v ); ?>" />
21 21
 			<?php
22 22
             }
23 23
         } else {
24 24
             ?>
25
-		<input type="hidden" name="<?php echo esc_attr($key); ?>" value="<?php echo esc_attr($value); ?>" />
25
+		<input type="hidden" name="<?php echo esc_attr( $key ); ?>" value="<?php echo esc_attr( $value ); ?>" />
26 26
 		<?php
27 27
         }
28 28
     }
29 29
 
30 30
     ?>
31
-	<input type="hidden" name="mode" value="<?php echo esc_attr($gravityview_view->search_mode); ?>" />
32
-	<input type="submit" class="button gv-search-button" id="gv_search_button_<?php echo $view_id; ?>" value="<?php esc_attr_e('Search', 'gravityview'); ?>" />
31
+	<input type="hidden" name="mode" value="<?php echo esc_attr( $gravityview_view->search_mode ); ?>" />
32
+	<input type="submit" class="button gv-search-button" id="gv_search_button_<?php echo $view_id; ?>" value="<?php esc_attr_e( 'Search', 'gravityview' ); ?>" />
33 33
 </div>
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-date.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@
 block discarded – undo
10 10
 ?>
11 11
 
12 12
 <div class="gv-search-box gv-search-date">
13
-	<?php if (!gv_empty($search_field['label'], false, false)) { ?>
14
-	<label for="search-box-<?php echo esc_attr($search_field['name']); ?>"><?php echo esc_html($search_field['label']); ?></label>
13
+	<?php if ( ! gv_empty( $search_field[ 'label' ], false, false ) ) { ?>
14
+	<label for="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>"><?php echo esc_html( $search_field[ 'label' ] ); ?></label>
15 15
 	<?php } ?>
16 16
 	<p>
17
-		<input type="text" name="<?php echo esc_attr($search_field['name']); ?>" id="search-box-<?php echo esc_attr($search_field['name']); ?>" value="<?php echo esc_attr($search_field['value']); ?>" class="<?php echo esc_html($gravityview_view->datepicker_class); ?>" >
17
+		<input type="text" name="<?php echo esc_attr( $search_field[ 'name' ] ); ?>" id="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>" value="<?php echo esc_attr( $search_field[ 'value' ] ); ?>" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" >
18 18
 	</p>
19 19
 </div>
20 20
\ No newline at end of file
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-input_text.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@
 block discarded – undo
9 9
 
10 10
 ?>
11 11
 <div class="gv-search-box gv-search-field-text">
12
-	<?php if (!gv_empty($search_field['label'], false, false)) { ?>
13
-	<label for="search-box-<?php echo esc_attr($search_field['name']); ?>"><?php echo esc_html($search_field['label']); ?></label>
12
+	<?php if ( ! gv_empty( $search_field[ 'label' ], false, false ) ) { ?>
13
+	<label for="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>"><?php echo esc_html( $search_field[ 'label' ] ); ?></label>
14 14
 	<?php } ?>
15 15
 	<p>
16
-		<input type="text" name="<?php echo esc_attr($search_field['name']); ?>" id="search-box-<?php echo esc_attr($search_field['name']); ?>" value="<?php echo esc_attr($search_field['value']); ?>">
16
+		<input type="text" name="<?php echo esc_attr( $search_field[ 'name' ] ); ?>" id="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>" value="<?php echo esc_attr( $search_field[ 'value' ] ); ?>">
17 17
 	</p>
18 18
 </div>
19 19
\ No newline at end of file
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/widget-search.php 2 patches
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -20,49 +20,49 @@
 block discarded – undo
20 20
 
21 21
 	<?php
22 22
 
23
-    /**
24
-     * @action `gravityview_search_widget_fields_before` Inside the `<form>` tag of the GravityView search form, before inputs are rendered
25
-     *
26
-     * @param GravityView_Widget_Search $this GravityView Widget instance
27
-     */
28
-    do_action('gravityview_search_widget_fields_before', $this);
23
+	/**
24
+	 * @action `gravityview_search_widget_fields_before` Inside the `<form>` tag of the GravityView search form, before inputs are rendered
25
+	 *
26
+	 * @param GravityView_Widget_Search $this GravityView Widget instance
27
+	 */
28
+	do_action('gravityview_search_widget_fields_before', $this);
29 29
 
30
-    foreach (array_merge($this->search_fields, $this->permalink_fields) as $search_field) {
30
+	foreach (array_merge($this->search_fields, $this->permalink_fields) as $search_field) {
31 31
 
32
-        /**
33
-         * @action `gravityview_search_widget_field_before` Before each search input is rendered (other than the submit button)
34
-         *
35
-         * @param GravityView_Widget_Search                                             $this         GravityView Widget instance
36
-         * @param array{key:string,label:string,value:string,type:string,choices:array} $search_field
37
-         */
38
-        do_action('gravityview_search_widget_field_before', $this, $search_field);
32
+		/**
33
+		 * @action `gravityview_search_widget_field_before` Before each search input is rendered (other than the submit button)
34
+		 *
35
+		 * @param GravityView_Widget_Search                                             $this         GravityView Widget instance
36
+		 * @param array{key:string,label:string,value:string,type:string,choices:array} $search_field
37
+		 */
38
+		do_action('gravityview_search_widget_field_before', $this, $search_field);
39 39
 
40
-        $gravityview_view->search_field = $search_field;
41
-        $this->render('search-field', $search_field['input'], false);
40
+		$gravityview_view->search_field = $search_field;
41
+		$this->render('search-field', $search_field['input'], false);
42 42
 
43
-        // show/hide the search button if there are input type fields
44
-        if (!$has_inputs && $search_field['input'] != 'link') {
45
-            $has_inputs = true;
46
-        }
43
+		// show/hide the search button if there are input type fields
44
+		if (!$has_inputs && $search_field['input'] != 'link') {
45
+			$has_inputs = true;
46
+		}
47 47
 
48
-        /**
49
-         * @action `gravityview_search_widget_field_after` After each search input is rendered (other than the submit button)
50
-         *
51
-         * @param GravityView_Widget_Search $this         GravityView Widget instance
52
-         * @param array                     $search_field
53
-         */
54
-        do_action('gravityview_search_widget_field_after', $this, $search_field);
55
-    }
48
+		/**
49
+		 * @action `gravityview_search_widget_field_after` After each search input is rendered (other than the submit button)
50
+		 *
51
+		 * @param GravityView_Widget_Search $this         GravityView Widget instance
52
+		 * @param array                     $search_field
53
+		 */
54
+		do_action('gravityview_search_widget_field_after', $this, $search_field);
55
+	}
56 56
 
57
-    /**
58
-     * @action `gravityview_search_widget_fields_after` Inside the `<form>` tag of the GravityView search form, after inputs are rendered
59
-     *
60
-     * @param GravityView_Widget_Search $this GravityView Widget instance
61
-     */
62
-    do_action('gravityview_search_widget_fields_after', $this);
57
+	/**
58
+	 * @action `gravityview_search_widget_fields_after` Inside the `<form>` tag of the GravityView search form, after inputs are rendered
59
+	 *
60
+	 * @param GravityView_Widget_Search $this GravityView Widget instance
61
+	 */
62
+	do_action('gravityview_search_widget_fields_after', $this);
63 63
 
64
-    if ($has_inputs) {
65
-        $this->render('search-field', 'submit', false);
66
-    }
64
+	if ($has_inputs) {
65
+		$this->render('search-field', 'submit', false);
66
+	}
67 67
 ?>
68 68
 </form>
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 
17 17
 ?>
18 18
 
19
-<form class="gv-widget-search <?php echo GravityView_Widget_Search::get_search_class(); ?>" method="<?php echo $search_method; ?>" action="<?php echo esc_url(GravityView_Widget_Search::get_search_form_action()); ?>" data-viewid="<?php echo $view_id; ?>">
19
+<form class="gv-widget-search <?php echo GravityView_Widget_Search::get_search_class(); ?>" method="<?php echo $search_method; ?>" action="<?php echo esc_url( GravityView_Widget_Search::get_search_form_action() ); ?>" data-viewid="<?php echo $view_id; ?>">
20 20
 
21 21
 	<?php
22 22
 
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
      *
26 26
      * @param GravityView_Widget_Search $this GravityView Widget instance
27 27
      */
28
-    do_action('gravityview_search_widget_fields_before', $this);
28
+    do_action( 'gravityview_search_widget_fields_before', $this );
29 29
 
30
-    foreach (array_merge($this->search_fields, $this->permalink_fields) as $search_field) {
30
+    foreach ( array_merge( $this->search_fields, $this->permalink_fields ) as $search_field ) {
31 31
 
32 32
         /**
33 33
          * @action `gravityview_search_widget_field_before` Before each search input is rendered (other than the submit button)
@@ -35,13 +35,13 @@  discard block
 block discarded – undo
35 35
          * @param GravityView_Widget_Search                                             $this         GravityView Widget instance
36 36
          * @param array{key:string,label:string,value:string,type:string,choices:array} $search_field
37 37
          */
38
-        do_action('gravityview_search_widget_field_before', $this, $search_field);
38
+        do_action( 'gravityview_search_widget_field_before', $this, $search_field );
39 39
 
40 40
         $gravityview_view->search_field = $search_field;
41
-        $this->render('search-field', $search_field['input'], false);
41
+        $this->render( 'search-field', $search_field[ 'input' ], false );
42 42
 
43 43
         // show/hide the search button if there are input type fields
44
-        if (!$has_inputs && $search_field['input'] != 'link') {
44
+        if ( ! $has_inputs && $search_field[ 'input' ] != 'link' ) {
45 45
             $has_inputs = true;
46 46
         }
47 47
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
          * @param GravityView_Widget_Search $this         GravityView Widget instance
52 52
          * @param array                     $search_field
53 53
          */
54
-        do_action('gravityview_search_widget_field_after', $this, $search_field);
54
+        do_action( 'gravityview_search_widget_field_after', $this, $search_field );
55 55
     }
56 56
 
57 57
     /**
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
      *
60 60
      * @param GravityView_Widget_Search $this GravityView Widget instance
61 61
      */
62
-    do_action('gravityview_search_widget_fields_after', $this);
62
+    do_action( 'gravityview_search_widget_fields_after', $this );
63 63
 
64
-    if ($has_inputs) {
65
-        $this->render('search-field', 'submit', false);
64
+    if ( $has_inputs ) {
65
+        $this->render( 'search-field', 'submit', false );
66 66
     }
67 67
 ?>
68 68
 </form>
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-date_range.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@
 block discarded – undo
6 6
  */
7 7
 $gravityview_view = GravityView_View::getInstance();
8 8
 $view_id = $gravityview_view->getViewId();
9
-$value = $gravityview_view->search_field['value'];
10
-$label = $gravityview_view->search_field['label'];
11
-$name = $gravityview_view->search_field['name'];
9
+$value = $gravityview_view->search_field[ 'value' ];
10
+$label = $gravityview_view->search_field[ 'label' ];
11
+$name = $gravityview_view->search_field[ 'name' ];
12 12
 ?>
13 13
 
14 14
 <div class="gv-search-box gv-search-date gv-search-date-range">
15
-	<?php if (!gv_empty($label, false, false)) { ?>
16
-	<label for="search-box-<?php echo esc_attr($name).'-start'; ?>"><?php echo esc_html($label); ?></label>
15
+	<?php if ( ! gv_empty( $label, false, false ) ) { ?>
16
+	<label for="search-box-<?php echo esc_attr( $name ) . '-start'; ?>"><?php echo esc_html( $label ); ?></label>
17 17
 	<?php } ?>
18 18
 	<p>
19
-		<input name="<?php echo esc_attr($name).'[start]'; ?>" id="search-box-<?php echo esc_attr($name).'-start'; ?>" type="text" class="<?php echo esc_html($gravityview_view->datepicker_class); ?>" placeholder="<?php esc_attr_e('Start date', 'gravityview'); ?>" value="<?php echo esc_attr($value['start']); ?>">
20
-		<input name="<?php echo esc_attr($name).'[end]'; ?>" id="search-box-<?php echo esc_attr($name).'-end'; ?>" type="text" class="<?php echo esc_html($gravityview_view->datepicker_class); ?>" placeholder="<?php esc_attr_e('End date', 'gravityview'); ?>" value="<?php echo esc_attr($value['end']); ?>">
19
+		<input name="<?php echo esc_attr( $name ) . '[start]'; ?>" id="search-box-<?php echo esc_attr( $name ) . '-start'; ?>" type="text" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e( 'Start date', 'gravityview' ); ?>" value="<?php echo esc_attr( $value[ 'start' ] ); ?>">
20
+		<input name="<?php echo esc_attr( $name ) . '[end]'; ?>" id="search-box-<?php echo esc_attr( $name ) . '-end'; ?>" type="text" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e( 'End date', 'gravityview' ); ?>" value="<?php echo esc_attr( $value[ 'end' ] ); ?>">
21 21
 	</p>
22 22
 </div>
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-entry_id.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,15 +6,15 @@
 block discarded – undo
6 6
  */
7 7
 $gravityview_view = GravityView_View::getInstance();
8 8
 $view_id = $gravityview_view->getViewId();
9
-$value = $gravityview_view->search_field['value'];
10
-$label = $gravityview_view->search_field['label'];
9
+$value = $gravityview_view->search_field[ 'value' ];
10
+$label = $gravityview_view->search_field[ 'label' ];
11 11
 ?>
12 12
 
13 13
 <div class="gv-search-box gv-search-field-entry_id">
14 14
 	<div class="gv-search">
15
-		<?php if (!gv_empty($label, false, false)) { ?>
16
-		<label for="gv_entry_id_<?php echo $view_id; ?>"><?php echo esc_html($label); ?></label>
15
+		<?php if ( ! gv_empty( $label, false, false ) ) { ?>
16
+		<label for="gv_entry_id_<?php echo $view_id; ?>"><?php echo esc_html( $label ); ?></label>
17 17
 		<?php } ?>
18
-		<p><input type="text" name="gv_id" id="gv_entry_id_<?php echo $view_id; ?>" value="<?php echo esc_attr($value); ?>" /></p>
18
+		<p><input type="text" name="gv_id" id="gv_entry_id_<?php echo $view_id; ?>" value="<?php echo esc_attr( $value ); ?>" /></p>
19 19
 	</div>
20 20
 </div>
21 21
\ No newline at end of file
Please login to merge, or discard this patch.