@@ -18,15 +18,15 @@ |
||
18 | 18 | |
19 | 19 | } |
20 | 20 | |
21 | - function render_input( $override_input = null ) { |
|
22 | - if( isset( $override_input ) ) { |
|
21 | + function render_input($override_input = null) { |
|
22 | + if (isset($override_input)) { |
|
23 | 23 | echo $override_input; |
24 | 24 | return; |
25 | 25 | } |
26 | 26 | |
27 | - foreach( $this->field['options'] as $value => $label ) : ?> |
|
27 | + foreach ($this->field['options'] as $value => $label) : ?> |
|
28 | 28 | <label class="<?php echo $this->get_label_class(); ?>"> |
29 | - <input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>-<?php echo esc_attr( $value ); ?>" type="radio" value="<?php echo esc_attr( $value ); ?>" <?php checked( $value, $this->value, true ); ?> /> <?php echo esc_html( $label ); ?> |
|
29 | + <input name="<?php echo esc_attr($this->name); ?>" id="<?php echo $this->get_field_id(); ?>-<?php echo esc_attr($value); ?>" type="radio" value="<?php echo esc_attr($value); ?>" <?php checked($value, $this->value, true); ?> /> <?php echo esc_html($label); ?> |
|
30 | 30 | </label> |
31 | 31 | <?php |
32 | 32 | endforeach; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | echo '<span class="gv-label">'.$this->get_field_label().'</span>'; |
12 | 12 | |
13 | - echo $this->get_tooltip() . $this->get_field_desc(); |
|
13 | + echo $this->get_tooltip().$this->get_field_desc(); |
|
14 | 14 | |
15 | 15 | $this->render_input(); |
16 | 16 | |
@@ -19,15 +19,15 @@ discard block |
||
19 | 19 | <?php |
20 | 20 | } |
21 | 21 | |
22 | - function render_input( $override_input = null ) { |
|
23 | - if( isset( $override_input ) ) { |
|
22 | + function render_input($override_input = null) { |
|
23 | + if (isset($override_input)) { |
|
24 | 24 | echo $override_input; |
25 | 25 | return; |
26 | 26 | } |
27 | 27 | ?> |
28 | - <select name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>"> |
|
29 | - <?php foreach( $this->field['options'] as $value => $label ) : ?> |
|
30 | - <option value="<?php echo esc_attr( $value ); ?>" <?php selected( $value, $this->value, true ); ?>><?php echo esc_html( $label ); ?></option> |
|
28 | + <select name="<?php echo esc_attr($this->name); ?>" id="<?php echo $this->get_field_id(); ?>"> |
|
29 | + <?php foreach ($this->field['options'] as $value => $label) : ?> |
|
30 | + <option value="<?php echo esc_attr($value); ?>" <?php selected($value, $this->value, true); ?>><?php echo esc_html($label); ?></option> |
|
31 | 31 | <?php endforeach; ?> |
32 | 32 | </select> |
33 | 33 | <?php |
@@ -28,10 +28,10 @@ |
||
28 | 28 | |
29 | 29 | $show_mt = $this->show_merge_tags(); |
30 | 30 | |
31 | - if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
32 | - $class = 'merge-tag-support mt-position-right mt-hide_all_fields '; |
|
33 | - } |
|
34 | - $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat'; |
|
31 | + if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
32 | + $class = 'merge-tag-support mt-position-right mt-hide_all_fields '; |
|
33 | + } |
|
34 | + $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat'; |
|
35 | 35 | |
36 | 36 | ?> |
37 | 37 | <input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="text" value="<?php echo esc_attr( $this->value ); ?>" class="<?php echo esc_attr( $class ); ?>"> |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | <label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>"><?php |
10 | 10 | |
11 | 11 | echo '<span class="gv-label">'.$this->get_field_label().'</span>'; |
12 | - echo $this->get_tooltip() . $this->get_field_desc(); |
|
12 | + echo $this->get_tooltip().$this->get_field_desc(); |
|
13 | 13 | ?><div> |
14 | 14 | <?php $this->render_input(); ?> |
15 | 15 | </div> |
@@ -17,9 +17,9 @@ discard block |
||
17 | 17 | <?php |
18 | 18 | } |
19 | 19 | |
20 | - function render_input( $override_input = null ) { |
|
20 | + function render_input($override_input = null) { |
|
21 | 21 | |
22 | - if( isset( $override_input ) ) { |
|
22 | + if (isset($override_input)) { |
|
23 | 23 | echo $override_input; |
24 | 24 | return; |
25 | 25 | } |
@@ -28,13 +28,13 @@ discard block |
||
28 | 28 | |
29 | 29 | $show_mt = $this->show_merge_tags(); |
30 | 30 | |
31 | - if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
31 | + if ($show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force') { |
|
32 | 32 | $class = 'merge-tag-support mt-position-right mt-hide_all_fields '; |
33 | 33 | } |
34 | - $class .= !empty( $this->field['class'] ) ? $this->field['class'] : 'widefat'; |
|
34 | + $class .= !empty($this->field['class']) ? $this->field['class'] : 'widefat'; |
|
35 | 35 | |
36 | 36 | ?> |
37 | - <input name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" type="text" value="<?php echo esc_attr( $this->value ); ?>" class="<?php echo esc_attr( $class ); ?>"> |
|
37 | + <input name="<?php echo esc_attr($this->name); ?>" id="<?php echo $this->get_field_id(); ?>" type="text" value="<?php echo esc_attr($this->value); ?>" class="<?php echo esc_attr($class); ?>"> |
|
38 | 38 | <?php |
39 | 39 | } |
40 | 40 |
@@ -28,14 +28,14 @@ |
||
28 | 28 | |
29 | 29 | $show_mt = $this->show_merge_tags(); |
30 | 30 | |
31 | - if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
32 | - $class = ' merge-tag-support mt-position-right '; |
|
33 | - |
|
34 | - if( empty( $this->field['show_all_fields'] ) ) { |
|
35 | - $class .= ' mt-hide_all_fields'; |
|
36 | - } |
|
37 | - } |
|
38 | - $class .= !empty( $this->field['class'] ) ? 'widefat ' . $this->field['class'] : 'widefat'; |
|
31 | + if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
32 | + $class = ' merge-tag-support mt-position-right '; |
|
33 | + |
|
34 | + if( empty( $this->field['show_all_fields'] ) ) { |
|
35 | + $class .= ' mt-hide_all_fields'; |
|
36 | + } |
|
37 | + } |
|
38 | + $class .= !empty( $this->field['class'] ) ? 'widefat ' . $this->field['class'] : 'widefat'; |
|
39 | 39 | |
40 | 40 | ?> |
41 | 41 | <textarea name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" class="<?php echo esc_attr( $class ); ?>" rows="5"><?php echo esc_textarea( $this->value ); ?></textarea> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | <label for="<?php echo $this->get_field_id(); ?>" class="<?php echo $this->get_label_class(); ?>"><?php |
11 | 11 | |
12 | 12 | echo '<span class="gv-label">'.$this->get_field_label().'</span>'; |
13 | - echo $this->get_tooltip() . $this->get_field_desc(); |
|
13 | + echo $this->get_tooltip().$this->get_field_desc(); |
|
14 | 14 | ?><div> |
15 | 15 | <?php $this->render_input(); ?> |
16 | 16 | </div> |
@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | <?php |
19 | 19 | } |
20 | 20 | |
21 | - function render_input( $override_input = null ) { |
|
22 | - if( isset( $override_input ) ) { |
|
21 | + function render_input($override_input = null) { |
|
22 | + if (isset($override_input)) { |
|
23 | 23 | echo $override_input; |
24 | 24 | return; |
25 | 25 | } |
@@ -28,17 +28,17 @@ discard block |
||
28 | 28 | |
29 | 29 | $show_mt = $this->show_merge_tags(); |
30 | 30 | |
31 | - if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
31 | + if ($show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force') { |
|
32 | 32 | $class = ' merge-tag-support mt-position-right '; |
33 | 33 | |
34 | - if( empty( $this->field['show_all_fields'] ) ) { |
|
34 | + if (empty($this->field['show_all_fields'])) { |
|
35 | 35 | $class .= ' mt-hide_all_fields'; |
36 | 36 | } |
37 | 37 | } |
38 | - $class .= !empty( $this->field['class'] ) ? 'widefat ' . $this->field['class'] : 'widefat'; |
|
38 | + $class .= !empty($this->field['class']) ? 'widefat '.$this->field['class'] : 'widefat'; |
|
39 | 39 | |
40 | 40 | ?> |
41 | - <textarea name="<?php echo esc_attr( $this->name ); ?>" id="<?php echo $this->get_field_id(); ?>" class="<?php echo esc_attr( $class ); ?>" rows="5"><?php echo esc_textarea( $this->value ); ?></textarea> |
|
41 | + <textarea name="<?php echo esc_attr($this->name); ?>" id="<?php echo $this->get_field_id(); ?>" class="<?php echo esc_attr($class); ?>" rows="5"><?php echo esc_textarea($this->value); ?></textarea> |
|
42 | 42 | <?php |
43 | 43 | } |
44 | 44 |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | * |
25 | 25 | * @return void |
26 | 26 | */ |
27 | - public static function add( GravityView_Metabox_Tab $meta_box ) { |
|
28 | - self::$meta_boxes[ $meta_box->id ] = $meta_box; |
|
27 | + public static function add(GravityView_Metabox_Tab $meta_box) { |
|
28 | + self::$meta_boxes[$meta_box->id] = $meta_box; |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -37,9 +37,9 @@ discard block |
||
37 | 37 | * |
38 | 38 | * @return void |
39 | 39 | */ |
40 | - public static function remove( $meta_box_id ) { |
|
41 | - if ( array_key_exists( $meta_box_id, self::$meta_boxes ) ) { |
|
42 | - unset( self::$meta_boxes[ $meta_box_id ] ); |
|
40 | + public static function remove($meta_box_id) { |
|
41 | + if (array_key_exists($meta_box_id, self::$meta_boxes)) { |
|
42 | + unset(self::$meta_boxes[$meta_box_id]); |
|
43 | 43 | } |
44 | 44 | } |
45 | 45 | |
@@ -52,12 +52,12 @@ discard block |
||
52 | 52 | * |
53 | 53 | * @return bool|GravityView_Metabox_Tab False if none exist at the key $id; GravityView_Metabox_Tab if exists. |
54 | 54 | */ |
55 | - public static function get( $id ) { |
|
56 | - if ( empty( self::$meta_boxes ) || empty( self::$meta_boxes[ $id ] ) ) { |
|
55 | + public static function get($id) { |
|
56 | + if (empty(self::$meta_boxes) || empty(self::$meta_boxes[$id])) { |
|
57 | 57 | return false; |
58 | 58 | } |
59 | 59 | |
60 | - return self::$meta_boxes[ $id ]; |
|
60 | + return self::$meta_boxes[$id]; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -7,55 +7,55 @@ |
||
7 | 7 | |
8 | 8 | |
9 | 9 | // Use nonce for verification |
10 | -wp_nonce_field( 'gravityview_select_form', 'gravityview_select_form_nonce' ); |
|
10 | +wp_nonce_field('gravityview_select_form', 'gravityview_select_form_nonce'); |
|
11 | 11 | |
12 | 12 | //current value |
13 | -$current_form = gravityview_get_form_id( $post->ID ); |
|
13 | +$current_form = gravityview_get_form_id($post->ID); |
|
14 | 14 | |
15 | 15 | // check for available gravity forms |
16 | 16 | $forms = gravityview_get_forms(); |
17 | 17 | |
18 | 18 | ?> |
19 | -<label for="gravityview_form_id" ><?php esc_html_e( 'Where would you like the data to come from for this View?', 'gravityview' ); ?></label> |
|
19 | +<label for="gravityview_form_id" ><?php esc_html_e('Where would you like the data to come from for this View?', 'gravityview'); ?></label> |
|
20 | 20 | |
21 | 21 | <p> |
22 | 22 | <?php |
23 | 23 | |
24 | - if ( empty( $current_form ) && GVCommon::has_cap( 'gravityforms_create_form' ) ) { |
|
24 | + if (empty($current_form) && GVCommon::has_cap('gravityforms_create_form')) { |
|
25 | 25 | ?> |
26 | - <a class="button button-primary" href="#gv_start_fresh" title="<?php esc_attr_e( 'Start Fresh', 'gravityview' ); ?>"><?php esc_html_e( 'Start Fresh', 'gravityview' ); ?></a> |
|
26 | + <a class="button button-primary" href="#gv_start_fresh" title="<?php esc_attr_e('Start Fresh', 'gravityview'); ?>"><?php esc_html_e('Start Fresh', 'gravityview'); ?></a> |
|
27 | 27 | |
28 | - <?php if( !empty( $forms ) ) { ?> |
|
29 | - <span> <?php esc_html_e( 'or use an existing form', 'gravityview' ); ?> </span> |
|
28 | + <?php if (!empty($forms)) { ?> |
|
29 | + <span> <?php esc_html_e('or use an existing form', 'gravityview'); ?> </span> |
|
30 | 30 | <?php } |
31 | 31 | } |
32 | 32 | |
33 | 33 | // If there are no forms to select, show no forms. |
34 | - if( !empty( $forms ) ) { ?> |
|
34 | + if (!empty($forms)) { ?> |
|
35 | 35 | <select name="gravityview_form_id" id="gravityview_form_id"> |
36 | - <option value="" <?php selected( '', $current_form, true ); ?>>— <?php esc_html_e( 'list of forms', 'gravityview' ); ?> —</option> |
|
37 | - <?php foreach( $forms as $form ) { ?> |
|
38 | - <option value="<?php echo $form['id']; ?>" <?php selected( $form['id'], $current_form, true ); ?>><?php echo esc_html( $form['title'] ); ?></option> |
|
36 | + <option value="" <?php selected('', $current_form, true); ?>>— <?php esc_html_e('list of forms', 'gravityview'); ?> —</option> |
|
37 | + <?php foreach ($forms as $form) { ?> |
|
38 | + <option value="<?php echo $form['id']; ?>" <?php selected($form['id'], $current_form, true); ?>><?php echo esc_html($form['title']); ?></option> |
|
39 | 39 | <?php } ?> |
40 | 40 | </select> |
41 | 41 | <?php } ?> |
42 | 42 | |
43 | - <a class="button button-primary" <?php if( empty( $current_form ) ) { echo 'style="display:none;"'; } ?> id="gv_switch_view_button" href="#gv_switch_view" title="<?php esc_attr_e( 'Switch View', 'gravityview' ); ?>"><?php esc_html_e( 'Switch View Type', 'gravityview' ); ?></a> |
|
43 | + <a class="button button-primary" <?php if (empty($current_form)) { echo 'style="display:none;"'; } ?> id="gv_switch_view_button" href="#gv_switch_view" title="<?php esc_attr_e('Switch View', 'gravityview'); ?>"><?php esc_html_e('Switch View Type', 'gravityview'); ?></a> |
|
44 | 44 | </p> |
45 | 45 | |
46 | 46 | <?php // confirm dialog box ?> |
47 | -<div id="gravityview_form_id_dialog" class="gv-dialog-options gv-dialog-warning" title="<?php esc_attr_e( 'Attention', 'gravityview' ); ?>"> |
|
48 | - <p><?php esc_html_e( 'Changing the form will reset your field configuration. Changes will be permanent once you save the View.', 'gravityview' ); ?></p> |
|
47 | +<div id="gravityview_form_id_dialog" class="gv-dialog-options gv-dialog-warning" title="<?php esc_attr_e('Attention', 'gravityview'); ?>"> |
|
48 | + <p><?php esc_html_e('Changing the form will reset your field configuration. Changes will be permanent once you save the View.', 'gravityview'); ?></p> |
|
49 | 49 | </div> |
50 | 50 | |
51 | 51 | <?php // confirm template dialog box ?> |
52 | -<div id="gravityview_switch_template_dialog" class="gv-dialog-options gv-dialog-warning" title="<?php esc_attr_e( 'Attention', 'gravityview' ); ?>"> |
|
53 | - <p><?php esc_html_e( 'Changing the View Type will reset your field configuration. Changes will be permanent once you save the View.', 'gravityview' ); ?></p> |
|
52 | +<div id="gravityview_switch_template_dialog" class="gv-dialog-options gv-dialog-warning" title="<?php esc_attr_e('Attention', 'gravityview'); ?>"> |
|
53 | + <p><?php esc_html_e('Changing the View Type will reset your field configuration. Changes will be permanent once you save the View.', 'gravityview'); ?></p> |
|
54 | 54 | </div> |
55 | 55 | |
56 | 56 | <?php // no js notice ?> |
57 | 57 | <div class="error hide-if-js"> |
58 | - <p><?php esc_html_e( 'GravityView requires Javascript to be enabled.', 'gravityview' ); ?></p> |
|
58 | + <p><?php esc_html_e('GravityView requires Javascript to be enabled.', 'gravityview'); ?></p> |
|
59 | 59 | </div> |
60 | 60 | |
61 | 61 | <?php |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @package GravityView |
|
4 | - * @subpackage Gravityview/admin/metaboxes/views |
|
5 | - * @since 1.8 |
|
6 | - * @global WP_Post $post |
|
7 | - */ |
|
3 | + * @package GravityView |
|
4 | + * @subpackage Gravityview/admin/metaboxes/views |
|
5 | + * @since 1.8 |
|
6 | + * @global WP_Post $post |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | |
10 | 10 | // Use nonce for verification |
@@ -1,14 +1,14 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Display the tab panels for the Settings metabox |
|
4 | - * |
|
5 | - * @package GravityView |
|
6 | - * @subpackage Gravityview/admin/metaboxes/views |
|
7 | - * @since 1.8 |
|
8 | - * |
|
9 | - * @global array $metaboxes |
|
10 | - * @global WP_Post $post |
|
11 | - */ |
|
3 | + * Display the tab panels for the Settings metabox |
|
4 | + * |
|
5 | + * @package GravityView |
|
6 | + * @subpackage Gravityview/admin/metaboxes/views |
|
7 | + * @since 1.8 |
|
8 | + * |
|
9 | + * @global array $metaboxes |
|
10 | + * @global WP_Post $post |
|
11 | + */ |
|
12 | 12 | |
13 | 13 | ?> |
14 | 14 |
@@ -19,11 +19,11 @@ |
||
19 | 19 | * Loop through the array of registered metaboxes |
20 | 20 | * @var GravityView_Metabox_Tab $metabox |
21 | 21 | */ |
22 | - foreach( $metaboxes as $metabox ) { |
|
22 | + foreach ($metaboxes as $metabox) { |
|
23 | 23 | |
24 | - echo '<div id="'.esc_attr( $metabox->id ).'">'; |
|
24 | + echo '<div id="'.esc_attr($metabox->id).'">'; |
|
25 | 25 | |
26 | - $metabox->render( $post ); |
|
26 | + $metabox->render($post); |
|
27 | 27 | |
28 | 28 | echo '</div>'; |
29 | 29 | } |
@@ -1,14 +1,14 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Display the tab navigation for the Settings metabox |
|
4 | - * |
|
5 | - * @package GravityView |
|
6 | - * @subpackage Gravityview/admin/metaboxes/views |
|
7 | - * @since 1.8 |
|
8 | - * |
|
9 | - * @global GravityView_Metabox_Tab[] $metaboxes |
|
10 | - * @global WP_Post $post |
|
11 | - */ |
|
3 | + * Display the tab navigation for the Settings metabox |
|
4 | + * |
|
5 | + * @package GravityView |
|
6 | + * @subpackage Gravityview/admin/metaboxes/views |
|
7 | + * @since 1.8 |
|
8 | + * |
|
9 | + * @global GravityView_Metabox_Tab[] $metaboxes |
|
10 | + * @global WP_Post $post |
|
11 | + */ |
|
12 | 12 | |
13 | 13 | ?> |
14 | 14 | <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> |
@@ -14,13 +14,13 @@ |
||
14 | 14 | <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"> |
15 | 15 | <?php |
16 | 16 | |
17 | - foreach( $metaboxes as $metabox ) { |
|
18 | - $class = !isset( $class ) ? 'nav-tab-active' : ''; |
|
17 | + foreach ($metaboxes as $metabox) { |
|
18 | + $class = !isset($class) ? 'nav-tab-active' : ''; |
|
19 | 19 | ?> |
20 | 20 | <li class="ui-state-default"> |
21 | - <a class="nav-tab ui-tabs-anchor <?php echo $class; ?>" href="#<?php echo esc_attr( $metabox->id ); ?>"> |
|
21 | + <a class="nav-tab ui-tabs-anchor <?php echo $class; ?>" href="#<?php echo esc_attr($metabox->id); ?>"> |
|
22 | 22 | <span class="<?php echo $metabox->icon_class_name; ?>"></span> |
23 | - <?php echo esc_html( $metabox->title ); ?> |
|
23 | + <?php echo esc_html($metabox->title); ?> |
|
24 | 24 | </a> |
25 | 25 | </li> |
26 | 26 | <?php |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @file select-template.php |
|
4 | - * @package GravityView |
|
5 | - * @subpackage Gravityview/admin/metaboxes/partials |
|
6 | - * @global WP_Post $post |
|
7 | - */ |
|
3 | + * @file select-template.php |
|
4 | + * @package GravityView |
|
5 | + * @subpackage Gravityview/admin/metaboxes/partials |
|
6 | + * @global WP_Post $post |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | global $post; |
10 | 10 |
@@ -9,40 +9,40 @@ |
||
9 | 9 | global $post; |
10 | 10 | |
11 | 11 | // Use nonce for verification |
12 | -wp_nonce_field( 'gravityview_select_template', 'gravityview_select_template_nonce' ); |
|
12 | +wp_nonce_field('gravityview_select_template', 'gravityview_select_template_nonce'); |
|
13 | 13 | |
14 | 14 | //current value |
15 | -$current_template = gravityview_get_template_id( $post->ID ); |
|
15 | +$current_template = gravityview_get_template_id($post->ID); |
|
16 | 16 | |
17 | 17 | $templates = gravityview_get_registered_templates(); |
18 | 18 | |
19 | 19 | // current input |
20 | 20 | ?> |
21 | -<input type="hidden" id="gravityview_directory_template" name="gravityview_directory_template" value="<?php echo esc_attr( $current_template ); ?>" /> |
|
21 | +<input type="hidden" id="gravityview_directory_template" name="gravityview_directory_template" value="<?php echo esc_attr($current_template); ?>" /> |
|
22 | 22 | |
23 | 23 | <?php // list all the available templates (type= fresh or custom ) ?> |
24 | 24 | <div class="gv-grid"> |
25 | - <?php foreach( $templates as $id => $template ) { |
|
26 | - $selected = ( $id == $current_template ) ? ' gv-selected' : ''; ?> |
|
25 | + <?php foreach ($templates as $id => $template) { |
|
26 | + $selected = ($id == $current_template) ? ' gv-selected' : ''; ?> |
|
27 | 27 | |
28 | 28 | <div class="gv-grid-col-1-3"> |
29 | - <div class="gv-view-types-module<?php echo $selected; ?>" data-filter="<?php echo esc_attr( $template['type'] ); ?>"> |
|
29 | + <div class="gv-view-types-module<?php echo $selected; ?>" data-filter="<?php echo esc_attr($template['type']); ?>"> |
|
30 | 30 | <div class="gv-view-types-hover"> |
31 | 31 | <div> |
32 | - <?php if( !empty( $template['buy_source'] ) ) { ?> |
|
33 | - <p><a href="<?php echo esc_url( $template['buy_source'] ); ?>" class="button-primary button-buy-now"><?php esc_html_e( 'Buy Now', 'gravityview'); ?></a></p> |
|
32 | + <?php if (!empty($template['buy_source'])) { ?> |
|
33 | + <p><a href="<?php echo esc_url($template['buy_source']); ?>" class="button-primary button-buy-now"><?php esc_html_e('Buy Now', 'gravityview'); ?></a></p> |
|
34 | 34 | <?php } else { ?> |
35 | - <p><a href="#gv_select_template" class="button button-large button-primary" data-templateid="<?php echo esc_attr( $id ); ?>"><?php esc_html_e( 'Select', 'gravityview'); ?></a></p> |
|
36 | - <?php if( !empty( $template['preview'] ) ) { ?> |
|
37 | - <a href="<?php echo esc_url( $template['preview'] ); ?>" rel="external" class="gv-site-preview"><i class="dashicons dashicons-admin-links" title="<?php esc_html_e( 'View a live demo of this preset', 'gravityview'); ?>"></i></a> |
|
35 | + <p><a href="#gv_select_template" class="button button-large button-primary" data-templateid="<?php echo esc_attr($id); ?>"><?php esc_html_e('Select', 'gravityview'); ?></a></p> |
|
36 | + <?php if (!empty($template['preview'])) { ?> |
|
37 | + <a href="<?php echo esc_url($template['preview']); ?>" rel="external" class="gv-site-preview"><i class="dashicons dashicons-admin-links" title="<?php esc_html_e('View a live demo of this preset', 'gravityview'); ?>"></i></a> |
|
38 | 38 | <?php } ?> |
39 | 39 | <?php } ?> |
40 | 40 | </div> |
41 | 41 | </div> |
42 | 42 | <div class="gv-view-types-normal"> |
43 | - <img src="<?php echo esc_url( $template['logo'] ); ?>" alt="<?php echo esc_attr( $template['label'] ); ?>"> |
|
44 | - <h5><?php echo esc_attr( $template['label'] ); ?></h5> |
|
45 | - <p class="description"><?php echo esc_attr( $template['description'] ); ?></p> |
|
43 | + <img src="<?php echo esc_url($template['logo']); ?>" alt="<?php echo esc_attr($template['label']); ?>"> |
|
44 | + <h5><?php echo esc_attr($template['label']); ?></h5> |
|
45 | + <p class="description"><?php echo esc_attr($template['description']); ?></p> |
|
46 | 46 | </div> |
47 | 47 | </div> |
48 | 48 | </div> |