@@ -11,7 +11,7 @@ |
||
| 11 | 11 | ?> |
| 12 | 12 | |
| 13 | 13 | <div class="gv-search-box gv-search-date"> |
| 14 | - <?php if( ! gv_empty( $search_field->label, false, false ) ) { ?> |
|
| 14 | + <?php if ( ! gv_empty( $search_field->label, false, false ) ) { ?> |
|
| 15 | 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> |
@@ -47,22 +47,22 @@ |
||
| 47 | 47 | |
| 48 | 48 | <?php |
| 49 | 49 | |
| 50 | - $search_value = \GV\Utils::_GET( $search_field->name ); |
|
| 50 | + $search_value = \GV\Utils::_GET( $search_field->name ); |
|
| 51 | 51 | |
| 52 | - foreach ( $search_field->choices as $k => $choice ) { |
|
| 52 | + foreach ( $search_field->choices as $k => $choice ) { |
|
| 53 | 53 | |
| 54 | - if ( 0 != $k ) { |
|
| 55 | - echo esc_html( $links_sep ); |
|
| 56 | - } |
|
| 54 | + if ( 0 != $k ) { |
|
| 55 | + echo esc_html( $links_sep ); |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | - $active = ( '' !== $search_value && in_array( $search_value, array( $choice['text'], $choice['value'] ) ) ) ? ' class="active"' : false; |
|
| 58 | + $active = ( '' !== $search_value && in_array( $search_value, array( $choice['text'], $choice['value'] ) ) ) ? ' class="active"' : false; |
|
| 59 | 59 | |
| 60 | - if ( $active ) { |
|
| 61 | - $link = remove_query_arg( array( 'pagenum', $search_field->name ), $base_url ); |
|
| 62 | - } else { |
|
| 63 | - $link = add_query_arg( array( $search_field->name => urlencode( $choice['value'] ) ), remove_query_arg( array('pagenum'), $base_url ) ); |
|
| 64 | - } |
|
| 65 | - ?> |
|
| 60 | + if ( $active ) { |
|
| 61 | + $link = remove_query_arg( array( 'pagenum', $search_field->name ), $base_url ); |
|
| 62 | + } else { |
|
| 63 | + $link = add_query_arg( array( $search_field->name => urlencode( $choice['value'] ) ), remove_query_arg( array('pagenum'), $base_url ) ); |
|
| 64 | + } |
|
| 65 | + ?> |
|
| 66 | 66 | |
| 67 | 67 | <a href="<?php echo esc_url_raw( $link ); ?>" <?php echo $active; ?>><?php echo esc_html( $choice['text'] ); ?></a> |
| 68 | 68 | |
@@ -55,16 +55,16 @@ |
||
| 55 | 55 | echo esc_html( $links_sep ); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - $active = ( '' !== $search_value && in_array( $search_value, array( $choice['text'], $choice['value'] ) ) ) ? ' class="active"' : false; |
|
| 58 | + $active = ( '' !== $search_value && in_array( $search_value, array( $choice[ 'text' ], $choice[ 'value' ] ) ) ) ? ' class="active"' : false; |
|
| 59 | 59 | |
| 60 | 60 | if ( $active ) { |
| 61 | 61 | $link = remove_query_arg( array( 'pagenum', $search_field->name ), $base_url ); |
| 62 | 62 | } else { |
| 63 | - $link = add_query_arg( array( $search_field->name => urlencode( $choice['value'] ) ), remove_query_arg( array('pagenum'), $base_url ) ); |
|
| 63 | + $link = add_query_arg( array( $search_field->name => urlencode( $choice[ 'value' ] ) ), remove_query_arg( array( 'pagenum' ), $base_url ) ); |
|
| 64 | 64 | } |
| 65 | 65 | ?> |
| 66 | 66 | |
| 67 | - <a href="<?php echo esc_url_raw( $link ); ?>" <?php echo $active; ?>><?php echo esc_html( $choice['text'] ); ?></a> |
|
| 67 | + <a href="<?php echo esc_url_raw( $link ); ?>" <?php echo $active; ?>><?php echo esc_html( $choice[ 'text' ] ); ?></a> |
|
| 68 | 68 | |
| 69 | 69 | <?php } ?> |
| 70 | 70 | </p> |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | ?> |
| 12 | 12 | <div class="gv-search-box gv-search-field-text"> |
| 13 | - <?php if( ! gv_empty( $search_field->label, false, false ) ) { ?> |
|
| 13 | + <?php if ( ! gv_empty( $search_field->label, false, false ) ) { ?> |
|
| 14 | 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> |