@@ -13,11 +13,11 @@ |
||
13 | 13 | ?> |
14 | 14 | |
15 | 15 | <div class="gv-search-box gv-search-date"> |
16 | - <?php if( ! gv_empty( $label, false ) ) { ?> |
|
17 | - <label for="gv_start_date_<?php echo $view_id; ?>"><?php echo esc_html( $label ); ?></label> |
|
16 | + <?php if (!gv_empty($label, false)) { ?> |
|
17 | + <label for="gv_start_date_<?php echo $view_id; ?>"><?php echo esc_html($label); ?></label> |
|
18 | 18 | <?php } ?> |
19 | 19 | <p> |
20 | - <input name="gv_start" id="gv_start_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e('Start date', 'gravityview' ); ?>" value="<?php echo $value['start']; ?>"> |
|
21 | - <input name="gv_end" id="gv_end_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e('End date', 'gravityview' ); ?>" value="<?php echo $value['end']; ?>"> |
|
20 | + <input name="gv_start" id="gv_start_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_html($gravityview_view->datepicker_class); ?>" placeholder="<?php esc_attr_e('Start date', 'gravityview'); ?>" value="<?php echo $value['start']; ?>"> |
|
21 | + <input name="gv_end" id="gv_end_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_html($gravityview_view->datepicker_class); ?>" placeholder="<?php esc_attr_e('End date', 'gravityview'); ?>" value="<?php echo $value['end']; ?>"> |
|
22 | 22 | </p> |
23 | 23 | </div> |
24 | 24 | \ No newline at end of file |
@@ -13,8 +13,8 @@ |
||
13 | 13 | |
14 | 14 | <div class="gv-search-box"> |
15 | 15 | <div class="gv-search"> |
16 | - <?php if( ! gv_empty( $label, false ) ) { ?> |
|
17 | - <label for="gv_entry_id_<?php echo $view_id; ?>"><?php echo esc_html( $label ); ?></label> |
|
16 | + <?php if (!gv_empty($label, false)) { ?> |
|
17 | + <label for="gv_entry_id_<?php echo $view_id; ?>"><?php echo esc_html($label); ?></label> |
|
18 | 18 | <?php } ?> |
19 | 19 | <p><input type="text" name="gv_id" id="gv_entry_id_<?php echo $view_id; ?>" value="<?php echo $value; ?>" /></p> |
20 | 20 | </div> |
@@ -7,4 +7,4 @@ |
||
7 | 7 | |
8 | 8 | $gravityview_view = GravityView_View::getInstance(); |
9 | 9 | $search_field = $gravityview_view->search_field; |
10 | -?><div><input type="hidden" name="<?php echo esc_attr( $search_field['name'] ); ?>" value="<?php echo esc_attr( $search_field['value'] ); ?>"></div> |
|
11 | 10 | \ No newline at end of file |
11 | +?><div><input type="hidden" name="<?php echo esc_attr($search_field['name']); ?>" value="<?php echo esc_attr($search_field['value']); ?>"></div> |
|
12 | 12 | \ No newline at end of file |
@@ -11,10 +11,10 @@ |
||
11 | 11 | ?> |
12 | 12 | |
13 | 13 | <div class="gv-search-box"> |
14 | - <?php if( ! gv_empty( $search_field['label'], false ) ) { ?> |
|
15 | - <label for=search-box-<?php echo esc_attr( $search_field['name'] ); ?>><?php echo esc_html( $search_field['label'] ); ?></label> |
|
14 | + <?php if (!gv_empty($search_field['label'], false)) { ?> |
|
15 | + <label for=search-box-<?php echo esc_attr($search_field['name']); ?>><?php echo esc_html($search_field['label']); ?></label> |
|
16 | 16 | <?php } ?> |
17 | 17 | <p> |
18 | - <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'] ); ?>"> |
|
18 | + <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']); ?>"> |
|
19 | 19 | </p> |
20 | 20 | </div> |
21 | 21 | \ No newline at end of file |
@@ -39,22 +39,22 @@ |
||
39 | 39 | |
40 | 40 | <?php |
41 | 41 | |
42 | - $search_value = rgget( $search_field['name'] ); |
|
42 | + $search_value = rgget( $search_field['name'] ); |
|
43 | 43 | |
44 | - foreach ( $search_field['choices'] as $k => $choice ) { |
|
44 | + foreach ( $search_field['choices'] as $k => $choice ) { |
|
45 | 45 | |
46 | - if ( 0 != $k ) { |
|
47 | - echo esc_html( $links_sep ); |
|
48 | - } |
|
46 | + if ( 0 != $k ) { |
|
47 | + echo esc_html( $links_sep ); |
|
48 | + } |
|
49 | 49 | |
50 | - $active = ( '' !== $search_value && in_array( $search_value, array( $choice['text'], $choice['value'] ) ) ) ? ' class="active"' : false; |
|
50 | + $active = ( '' !== $search_value && in_array( $search_value, array( $choice['text'], $choice['value'] ) ) ) ? ' class="active"' : false; |
|
51 | 51 | |
52 | - if ( $active ) { |
|
53 | - $link = remove_query_arg( array( 'pagenum', $search_field['name'] ), $base_url ); |
|
54 | - } else { |
|
55 | - $link = add_query_arg( array( $search_field['name'] => urlencode( $choice['value'] ) ), remove_query_arg( array('pagenum'), $base_url ) ); |
|
56 | - } |
|
57 | - ?> |
|
52 | + if ( $active ) { |
|
53 | + $link = remove_query_arg( array( 'pagenum', $search_field['name'] ), $base_url ); |
|
54 | + } else { |
|
55 | + $link = add_query_arg( array( $search_field['name'] => urlencode( $choice['value'] ) ), remove_query_arg( array('pagenum'), $base_url ) ); |
|
56 | + } |
|
57 | + ?> |
|
58 | 58 | |
59 | 59 | <a href="<?php echo esc_url_raw( $link ); ?>" <?php echo $active; ?>><?php echo esc_html( $choice['text'] ); ?></a> |
60 | 60 |
@@ -13,8 +13,8 @@ discard block |
||
13 | 13 | $base_url = GravityView_Widget_Search::get_search_form_action(); |
14 | 14 | |
15 | 15 | // Make sure that there are choices to display |
16 | -if ( empty( $search_field['choices'] ) ) { |
|
17 | - do_action( 'gravityview_log_debug', 'search-field-link.php - No choices for field' ); |
|
16 | +if (empty($search_field['choices'])) { |
|
17 | + do_action('gravityview_log_debug', 'search-field-link.php - No choices for field'); |
|
18 | 18 | return; |
19 | 19 | } |
20 | 20 | |
@@ -22,41 +22,41 @@ discard block |
||
22 | 22 | * @filter `gravityview/extension/search/links_sep` Change the label for the "Link" search bar input type |
23 | 23 | * @param string $links_label Default: `Show only:` |
24 | 24 | */ |
25 | -$links_label = apply_filters( 'gravityview/extension/search/links_label', __( 'Show only:', 'gravityview' ) ); |
|
25 | +$links_label = apply_filters('gravityview/extension/search/links_label', __('Show only:', 'gravityview')); |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * @filter `gravityview/extension/search/links_sep` Change what separates search bar "Link" input type links |
29 | 29 | * @param string $links_sep Default: ` | ` Used to connect multiple links |
30 | 30 | */ |
31 | -$links_sep = apply_filters( 'gravityview/extension/search/links_sep', ' | ' ); |
|
31 | +$links_sep = apply_filters('gravityview/extension/search/links_sep', ' | '); |
|
32 | 32 | |
33 | 33 | ?> |
34 | 34 | |
35 | 35 | <div class="gv-search-box"> |
36 | 36 | |
37 | 37 | <p class="gv-search-box-links"> |
38 | - <?php echo esc_html( $links_label ); ?> |
|
38 | + <?php echo esc_html($links_label); ?> |
|
39 | 39 | |
40 | 40 | <?php |
41 | 41 | |
42 | - $search_value = rgget( $search_field['name'] ); |
|
42 | + $search_value = rgget($search_field['name']); |
|
43 | 43 | |
44 | - foreach ( $search_field['choices'] as $k => $choice ) { |
|
44 | + foreach ($search_field['choices'] as $k => $choice) { |
|
45 | 45 | |
46 | - if ( 0 != $k ) { |
|
47 | - echo esc_html( $links_sep ); |
|
46 | + if (0 != $k) { |
|
47 | + echo esc_html($links_sep); |
|
48 | 48 | } |
49 | 49 | |
50 | - $active = ( '' !== $search_value && in_array( $search_value, array( $choice['text'], $choice['value'] ) ) ) ? ' class="active"' : false; |
|
50 | + $active = ('' !== $search_value && in_array($search_value, array($choice['text'], $choice['value']))) ? ' class="active"' : false; |
|
51 | 51 | |
52 | - if ( $active ) { |
|
53 | - $link = remove_query_arg( array( 'pagenum', $search_field['name'] ), $base_url ); |
|
52 | + if ($active) { |
|
53 | + $link = remove_query_arg(array('pagenum', $search_field['name']), $base_url); |
|
54 | 54 | } else { |
55 | - $link = add_query_arg( array( $search_field['name'] => urlencode( $choice['value'] ) ), remove_query_arg( array('pagenum'), $base_url ) ); |
|
55 | + $link = add_query_arg(array($search_field['name'] => urlencode($choice['value'])), remove_query_arg(array('pagenum'), $base_url)); |
|
56 | 56 | } |
57 | 57 | ?> |
58 | 58 | |
59 | - <a href="<?php echo esc_url_raw( $link ); ?>" <?php echo $active; ?>><?php echo esc_html( $choice['text'] ); ?></a> |
|
59 | + <a href="<?php echo esc_url_raw($link); ?>" <?php echo $active; ?>><?php echo esc_html($choice['text']); ?></a> |
|
60 | 60 | |
61 | 61 | <?php } ?> |
62 | 62 | </p> |
@@ -1,9 +1,9 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Display the search MULTISELECT input field |
|
4 | - * |
|
5 | - * @see class-search-widget.php |
|
6 | - */ |
|
3 | + * Display the search MULTISELECT input field |
|
4 | + * |
|
5 | + * @see class-search-widget.php |
|
6 | + */ |
|
7 | 7 | |
8 | 8 | $gravityview_view = GravityView_View::getInstance(); |
9 | 9 | $view_id = $gravityview_view->getViewId(); |
@@ -10,22 +10,22 @@ |
||
10 | 10 | $search_field = $gravityview_view->search_field; |
11 | 11 | |
12 | 12 | // Make sure that there are choices to display |
13 | -if( empty( $search_field['choices'] ) ) { |
|
14 | - do_action('gravityview_log_debug', 'search-field-multiselect.php - No choices for field' ); |
|
13 | +if (empty($search_field['choices'])) { |
|
14 | + do_action('gravityview_log_debug', 'search-field-multiselect.php - No choices for field'); |
|
15 | 15 | return; |
16 | 16 | } |
17 | 17 | |
18 | 18 | ?> |
19 | 19 | <div class="gv-search-box"> |
20 | - <?php if( ! gv_empty( $search_field['label'], 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)) { ?> |
|
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 | - <select name="<?php echo esc_attr( $search_field['name'] ); ?>[]" id="search-box-<?php echo esc_attr( $search_field['name'] ); ?>" multiple> |
|
25 | - <option value="" <?php gv_selected( '', $search_field['value'], true ); ?>>—</option> |
|
24 | + <select name="<?php echo esc_attr($search_field['name']); ?>[]" id="search-box-<?php echo esc_attr($search_field['name']); ?>" multiple> |
|
25 | + <option value="" <?php gv_selected('', $search_field['value'], true); ?>>—</option> |
|
26 | 26 | <?php |
27 | - foreach( $search_field['choices'] as $choice ) : ?> |
|
28 | - <option value="<?php echo esc_attr( $choice['value'] ); ?>" <?php gv_selected( $choice['value'], $search_field['value'], true ); ?>><?php echo esc_html( $choice['text'] ); ?></option> |
|
27 | + foreach ($search_field['choices'] as $choice) : ?> |
|
28 | + <option value="<?php echo esc_attr($choice['value']); ?>" <?php gv_selected($choice['value'], $search_field['value'], true); ?>><?php echo esc_html($choice['text']); ?></option> |
|
29 | 29 | <?php endforeach; ?> |
30 | 30 | </select> |
31 | 31 | </p> |
@@ -10,22 +10,22 @@ |
||
10 | 10 | $search_field = $gravityview_view->search_field; |
11 | 11 | |
12 | 12 | // Make sure that there are choices to display |
13 | -if( empty( $search_field['choices'] ) ) { |
|
14 | - do_action('gravityview_log_debug', 'search-field-radio.php - No choices for field' ); |
|
13 | +if (empty($search_field['choices'])) { |
|
14 | + do_action('gravityview_log_debug', 'search-field-radio.php - No choices for field'); |
|
15 | 15 | return; |
16 | 16 | } |
17 | 17 | |
18 | 18 | ?> |
19 | 19 | <div class="gv-search-box"> |
20 | - <?php if( ! gv_empty( $search_field['label'], 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)) { ?> |
|
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 } ?> |
@@ -14,8 +14,8 @@ |
||
14 | 14 | |
15 | 15 | <div class="gv-search-box"> |
16 | 16 | <div class="gv-search"> |
17 | - <?php if( ! gv_empty( $label, false ) ) { ?> |
|
18 | - <label for="gv_search_<?php echo $view_id; ?>"><?php echo esc_html( $label ); ?></label> |
|
17 | + <?php if (!gv_empty($label, false)) { ?> |
|
18 | + <label for="gv_search_<?php echo $view_id; ?>"><?php echo esc_html($label); ?></label> |
|
19 | 19 | <?php } ?> |
20 | 20 | <p><input type="text" name="gv_search" id="gv_search_<?php echo $view_id; ?>" value="<?php echo $value; ?>" /></p> |
21 | 21 | </div> |
@@ -10,22 +10,22 @@ |
||
10 | 10 | $search_field = $gravityview_view->search_field; |
11 | 11 | |
12 | 12 | // Make sure that there are choices to display |
13 | -if( empty( $search_field['choices'] ) ) { |
|
14 | - do_action('gravityview_log_debug', 'search-field-select.php - No choices for field' ); |
|
13 | +if (empty($search_field['choices'])) { |
|
14 | + do_action('gravityview_log_debug', 'search-field-select.php - No choices for field'); |
|
15 | 15 | return; |
16 | 16 | } |
17 | 17 | |
18 | 18 | ?> |
19 | 19 | <div class="gv-search-box"> |
20 | - <?php if( ! gv_empty( $search_field['label'], 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)) { ?> |
|
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 | - <select name="<?php echo esc_attr( $search_field['name'] ); ?>" id="search-box-<?php echo esc_attr( $search_field['name'] ); ?>"> |
|
25 | - <option value="" <?php selected( '', $search_field['value'], true ); ?>>—</option> |
|
24 | + <select name="<?php echo esc_attr($search_field['name']); ?>" id="search-box-<?php echo esc_attr($search_field['name']); ?>"> |
|
25 | + <option value="" <?php selected('', $search_field['value'], true); ?>>—</option> |
|
26 | 26 | <?php |
27 | - foreach( $search_field['choices'] as $choice ) : ?> |
|
28 | - <option value="<?php echo esc_attr( $choice['value'] ); ?>" <?php selected( $choice['value'], $search_field['value'], true ); ?>><?php echo esc_html( $choice['text'] ); ?></option> |
|
27 | + foreach ($search_field['choices'] as $choice) : ?> |
|
28 | + <option value="<?php echo esc_attr($choice['value']); ?>" <?php selected($choice['value'], $search_field['value'], true); ?>><?php echo esc_html($choice['text']); ?></option> |
|
29 | 29 | <?php endforeach; ?> |
30 | 30 | </select> |
31 | 31 | </p> |