@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | */ |
247 | 247 | public static function get_duplicate_link( $entry, $view_id, $post_id = null ) { |
248 | 248 | |
249 | - $base = GravityView_API::directory_link( $post_id ? : $view_id, true ); |
|
249 | + $base = GravityView_API::directory_link( $post_id ? : $view_id, true ); |
|
250 | 250 | |
251 | 251 | if ( empty( $base ) ) { |
252 | 252 | gravityview()->log->error( 'Post ID does not exist: {post_id}', array( 'post_id' => $post_id ) ); |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | 'action' => 'duplicate', |
258 | 258 | 'entry_id' => $entry['id'], |
259 | 259 | 'gvid' => $view_id, |
260 | - 'view_id' => $view_id, |
|
260 | + 'view_id' => $view_id, |
|
261 | 261 | ), $base ); |
262 | 262 | |
263 | 263 | return add_query_arg( 'duplicate', wp_create_nonce( self::get_nonce_key( $entry['id'] ) ), $actionurl ); |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | * @since 2.5 |
461 | 461 | * @param array $duplicated_entry The duplicated entry |
462 | 462 | * @param array $entry The original entry |
463 | - */ |
|
463 | + */ |
|
464 | 464 | do_action( 'gravityview/duplicate-entry/duplicated', $duplicated_entry, $entry ); |
465 | 465 | |
466 | 466 | gravityview()->log->debug( 'Duplicate response: {duplicate_response}', array( 'duplicate_response' => $duplicate_response ) ); |
@@ -31,11 +31,11 @@ discard block |
||
31 | 31 | |
32 | 32 | <?php |
33 | 33 | |
34 | - do_action('gravityview_render_widgets_active_areas', $curr_template, 'footer', $post->ID ); |
|
34 | + do_action('gravityview_render_widgets_active_areas', $curr_template, 'footer', $post->ID ); |
|
35 | 35 | |
36 | - do_action('gravityview_render_field_pickers', 'directory' ); |
|
36 | + do_action('gravityview_render_field_pickers', 'directory' ); |
|
37 | 37 | |
38 | - ?> |
|
38 | + ?> |
|
39 | 39 | |
40 | 40 | <?php // list of available widgets to be shown in the popup ?> |
41 | 41 | <div id="directory-available-widgets" class="hide-if-js gv-tooltip"> |
@@ -60,13 +60,13 @@ discard block |
||
60 | 60 | |
61 | 61 | <div id="single-active-fields" class="gv-grid"> |
62 | 62 | <?php |
63 | - if(!empty( $curr_template ) ) { |
|
64 | - do_action('gravityview_render_directory_active_areas', $curr_template, 'single', $post->ID, true ); |
|
65 | - } |
|
66 | - ?> |
|
63 | + if(!empty( $curr_template ) ) { |
|
64 | + do_action('gravityview_render_directory_active_areas', $curr_template, 'single', $post->ID, true ); |
|
65 | + } |
|
66 | + ?> |
|
67 | 67 | </div> |
68 | 68 | <?php |
69 | - do_action('gravityview_render_field_pickers', 'single' ); |
|
69 | + do_action('gravityview_render_field_pickers', 'single' ); |
|
70 | 70 | ?> |
71 | 71 | </div> |
72 | 72 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | </div> |
86 | 86 | |
87 | 87 | <?php |
88 | - do_action('gravityview_render_field_pickers', 'edit' ); |
|
88 | + do_action('gravityview_render_field_pickers', 'edit' ); |
|
89 | 89 | ?> |
90 | 90 | |
91 | 91 | </div> |
@@ -69,7 +69,7 @@ |
||
69 | 69 | |
70 | 70 | $url = add_query_arg( array( |
71 | 71 | 'utm_source' => 'powered_by', |
72 | - 'utm_term' => get_bloginfo('name' ), |
|
72 | + 'utm_term' => get_bloginfo('name' ), |
|
73 | 73 | ), $url ); |
74 | 74 | |
75 | 75 | /** |
@@ -39,13 +39,13 @@ |
||
39 | 39 | 'tooltip' => __( 'Enter the number of words to be shown. If specified it truncates the text. Leave it blank if you want to show the full text.', 'gravityview' ), |
40 | 40 | ); |
41 | 41 | |
42 | - $field_options['make_clickable'] = array( |
|
43 | - 'type' => 'checkbox', |
|
44 | - 'merge_tags' => false, |
|
45 | - 'value' => 0, |
|
46 | - 'label' => __( 'Convert text URLs to HTML links', 'gravityview' ), |
|
47 | - 'tooltip' => __( 'Converts URI, www, FTP, and email addresses in HTML links', 'gravityview' ), |
|
48 | - ); |
|
42 | + $field_options['make_clickable'] = array( |
|
43 | + 'type' => 'checkbox', |
|
44 | + 'merge_tags' => false, |
|
45 | + 'value' => 0, |
|
46 | + 'label' => __( 'Convert text URLs to HTML links', 'gravityview' ), |
|
47 | + 'tooltip' => __( 'Converts URI, www, FTP, and email addresses in HTML links', 'gravityview' ), |
|
48 | + ); |
|
49 | 49 | |
50 | 50 | $field_options['allow_html'] = array( |
51 | 51 | 'type' => 'checkbox', |
@@ -10,107 +10,107 @@ discard block |
||
10 | 10 | * |
11 | 11 | * @var string |
12 | 12 | */ |
13 | - protected $name; |
|
13 | + protected $name; |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * Field settings |
17 | 17 | * |
18 | 18 | * @var array |
19 | 19 | */ |
20 | - protected $field; |
|
20 | + protected $field; |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * Field current value |
24 | 24 | * |
25 | 25 | * @var mixed |
26 | 26 | */ |
27 | - protected $value; |
|
28 | - |
|
29 | - function __construct( $name = '', $field = array(), $curr_value = NULL ) { |
|
30 | - |
|
31 | - $this->name = $name; |
|
32 | - |
|
33 | - $defaults = self::get_field_defaults(); |
|
34 | - |
|
35 | - // Backward compatibility |
|
36 | - if( !empty( $field['choices'] ) ) { |
|
37 | - $field['options'] = $field['choices']; |
|
38 | - unset( $field['choices'] ); |
|
39 | - } |
|
40 | - |
|
41 | - $this->field = wp_parse_args( $field, $defaults ); |
|
42 | - |
|
43 | - $this->value = is_null( $curr_value ) ? $this->field['value'] : $curr_value; |
|
44 | - |
|
45 | - } |
|
46 | - |
|
47 | - /** |
|
48 | - * Returns the default details for a field option |
|
49 | - * |
|
50 | - * - default // default option value, in case nothing is defined (@deprecated) |
|
51 | - * - desc // option description |
|
52 | - * - value // the option default value |
|
53 | - * - label // the option label |
|
54 | - * - left_label // In case of checkboxes, left label will appear on the left of the checkbox |
|
55 | - * - id // the field id |
|
56 | - * - type // the option type ( text, checkbox, select, ... ) |
|
57 | - * - options // when type is select, define the select options ('choices' is @deprecated) |
|
58 | - * - merge_tags // if the option supports merge tags feature |
|
59 | - * - class // (new) define extra classes for the field |
|
60 | - * - tooltip // |
|
61 | - * |
|
62 | - * @return array |
|
63 | - */ |
|
64 | - public static function get_field_defaults() { |
|
65 | - return array( |
|
66 | - 'desc' => '', |
|
67 | - 'value' => null, |
|
68 | - 'label' => '', |
|
69 | - 'left_label' => null, |
|
70 | - 'id' => null, |
|
71 | - 'type' => 'text', |
|
72 | - 'options' => null, |
|
73 | - 'merge_tags' => true, |
|
74 | - 'class' => '', |
|
75 | - 'tooltip' => null, |
|
76 | - 'requires' => null |
|
77 | - ); |
|
78 | - } |
|
79 | - |
|
80 | - |
|
81 | - function get_tooltip() { |
|
82 | - if( ! function_exists('gform_tooltip') ) { |
|
83 | - return null; |
|
84 | - } |
|
85 | - |
|
86 | - $article = wp_parse_args( \GV\Utils::get( $this->field, 'article', array() ), array( |
|
87 | - 'id' => '', |
|
88 | - 'type' => 'modal', |
|
89 | - 'url' => '#', |
|
90 | - ) ); |
|
91 | - |
|
92 | - return !empty( $this->field['tooltip'] ) ? ' '. $this->tooltip( $this->field['tooltip'], false, true, $article ) : null; |
|
93 | - } |
|
94 | - |
|
95 | - /** |
|
96 | - * Displays the tooltip |
|
97 | - * |
|
98 | - * @since 2.8.1 |
|
99 | - * |
|
100 | - * @global $__gf_tooltips |
|
101 | - * |
|
102 | - * @param string $name The name of the tooltip to be displayed |
|
103 | - * @param string $css_class Optional. The CSS class to apply toi the element. Defaults to empty string. |
|
104 | - * @param bool $return Optional. If the tooltip should be returned instead of output. Defaults to false (output) |
|
105 | - * @param array $article Optional. Details about support doc article connected to the tooltip. { |
|
106 | - * @type string $id Unique ID of article for Beacon API |
|
107 | - * @type string $url URL of support doc article |
|
108 | - * @type string $type Type of Beacon element to open. {@see https://developer.helpscout.com/beacon-2/web/javascript-api/#beaconarticle} |
|
109 | - * } |
|
110 | - * |
|
111 | - * @return string |
|
112 | - */ |
|
113 | - function tooltip( $name, $css_class = '', $return = false, $article = array() ) { |
|
27 | + protected $value; |
|
28 | + |
|
29 | + function __construct( $name = '', $field = array(), $curr_value = NULL ) { |
|
30 | + |
|
31 | + $this->name = $name; |
|
32 | + |
|
33 | + $defaults = self::get_field_defaults(); |
|
34 | + |
|
35 | + // Backward compatibility |
|
36 | + if( !empty( $field['choices'] ) ) { |
|
37 | + $field['options'] = $field['choices']; |
|
38 | + unset( $field['choices'] ); |
|
39 | + } |
|
40 | + |
|
41 | + $this->field = wp_parse_args( $field, $defaults ); |
|
42 | + |
|
43 | + $this->value = is_null( $curr_value ) ? $this->field['value'] : $curr_value; |
|
44 | + |
|
45 | + } |
|
46 | + |
|
47 | + /** |
|
48 | + * Returns the default details for a field option |
|
49 | + * |
|
50 | + * - default // default option value, in case nothing is defined (@deprecated) |
|
51 | + * - desc // option description |
|
52 | + * - value // the option default value |
|
53 | + * - label // the option label |
|
54 | + * - left_label // In case of checkboxes, left label will appear on the left of the checkbox |
|
55 | + * - id // the field id |
|
56 | + * - type // the option type ( text, checkbox, select, ... ) |
|
57 | + * - options // when type is select, define the select options ('choices' is @deprecated) |
|
58 | + * - merge_tags // if the option supports merge tags feature |
|
59 | + * - class // (new) define extra classes for the field |
|
60 | + * - tooltip // |
|
61 | + * |
|
62 | + * @return array |
|
63 | + */ |
|
64 | + public static function get_field_defaults() { |
|
65 | + return array( |
|
66 | + 'desc' => '', |
|
67 | + 'value' => null, |
|
68 | + 'label' => '', |
|
69 | + 'left_label' => null, |
|
70 | + 'id' => null, |
|
71 | + 'type' => 'text', |
|
72 | + 'options' => null, |
|
73 | + 'merge_tags' => true, |
|
74 | + 'class' => '', |
|
75 | + 'tooltip' => null, |
|
76 | + 'requires' => null |
|
77 | + ); |
|
78 | + } |
|
79 | + |
|
80 | + |
|
81 | + function get_tooltip() { |
|
82 | + if( ! function_exists('gform_tooltip') ) { |
|
83 | + return null; |
|
84 | + } |
|
85 | + |
|
86 | + $article = wp_parse_args( \GV\Utils::get( $this->field, 'article', array() ), array( |
|
87 | + 'id' => '', |
|
88 | + 'type' => 'modal', |
|
89 | + 'url' => '#', |
|
90 | + ) ); |
|
91 | + |
|
92 | + return !empty( $this->field['tooltip'] ) ? ' '. $this->tooltip( $this->field['tooltip'], false, true, $article ) : null; |
|
93 | + } |
|
94 | + |
|
95 | + /** |
|
96 | + * Displays the tooltip |
|
97 | + * |
|
98 | + * @since 2.8.1 |
|
99 | + * |
|
100 | + * @global $__gf_tooltips |
|
101 | + * |
|
102 | + * @param string $name The name of the tooltip to be displayed |
|
103 | + * @param string $css_class Optional. The CSS class to apply toi the element. Defaults to empty string. |
|
104 | + * @param bool $return Optional. If the tooltip should be returned instead of output. Defaults to false (output) |
|
105 | + * @param array $article Optional. Details about support doc article connected to the tooltip. { |
|
106 | + * @type string $id Unique ID of article for Beacon API |
|
107 | + * @type string $url URL of support doc article |
|
108 | + * @type string $type Type of Beacon element to open. {@see https://developer.helpscout.com/beacon-2/web/javascript-api/#beaconarticle} |
|
109 | + * } |
|
110 | + * |
|
111 | + * @return string |
|
112 | + */ |
|
113 | + function tooltip( $name, $css_class = '', $return = false, $article = array() ) { |
|
114 | 114 | global $__gf_tooltips; //declared as global to improve WPML performance |
115 | 115 | |
116 | 116 | $css_class = empty( $css_class ) ? 'tooltip' : $css_class; |
@@ -128,17 +128,17 @@ discard block |
||
128 | 128 | $tooltip_class = isset( $__gf_tooltips[ $name ] ) ? "tooltip_{$name}" : ''; |
129 | 129 | $tooltip_class = esc_attr( $tooltip_class ); |
130 | 130 | |
131 | - /** |
|
132 | - * Below this line has been modified by GravityView. |
|
133 | - */ |
|
131 | + /** |
|
132 | + * Below this line has been modified by GravityView. |
|
133 | + */ |
|
134 | 134 | |
135 | 135 | if ( empty( $tooltip_text ) && empty( $article['id'] ) ) { |
136 | 136 | return ''; |
137 | 137 | } |
138 | 138 | |
139 | 139 | $url = '#'; |
140 | - $atts = 'onclick="return false;" onkeypress="return false;"'; |
|
141 | - $anchor_text = '<i class=\'fa fa-question-circle\'></i>'; |
|
140 | + $atts = 'onclick="return false;" onkeypress="return false;"'; |
|
141 | + $anchor_text = '<i class=\'fa fa-question-circle\'></i>'; |
|
142 | 142 | $css_class = gravityview_sanitize_html_class( 'gf_tooltip ' . $css_class . ' ' . $tooltip_class ); |
143 | 143 | |
144 | 144 | $tooltip = sprintf( '<a href="%s" %s class="%s" title="%s" role="button">%s</a>', |
@@ -149,11 +149,11 @@ discard block |
||
149 | 149 | $anchor_text |
150 | 150 | ); |
151 | 151 | |
152 | - /** |
|
153 | - * Modify the tooltip HTML before outputting |
|
154 | - * @internal |
|
155 | - * @see GravityView_Support_Port::maybe_add_article_to_tooltip() |
|
156 | - */ |
|
152 | + /** |
|
153 | + * Modify the tooltip HTML before outputting |
|
154 | + * @internal |
|
155 | + * @see GravityView_Support_Port::maybe_add_article_to_tooltip() |
|
156 | + */ |
|
157 | 157 | $tooltip = apply_filters( 'gravityview/tooltips/tooltip', $tooltip, $article, $url, $atts, $css_class, $tooltip_text, $anchor_text ); |
158 | 158 | |
159 | 159 | if ( ! $return ) { |
@@ -163,84 +163,84 @@ discard block |
||
163 | 163 | return $tooltip; |
164 | 164 | } |
165 | 165 | |
166 | - /** |
|
167 | - * Build input id based on the name |
|
168 | - * @return string |
|
169 | - */ |
|
170 | - function get_field_id() { |
|
171 | - if( isset( $this->field['id'] ) ) { |
|
172 | - return esc_attr( $this->field['id'] ); |
|
173 | - } |
|
174 | - return esc_attr( sanitize_html_class( $this->name ) ); |
|
175 | - } |
|
176 | - |
|
177 | - /** |
|
178 | - * Retrieve field label |
|
179 | - * @return string |
|
180 | - */ |
|
181 | - function get_field_label() { |
|
182 | - return esc_html( trim( $this->field['label'] ) ); |
|
183 | - } |
|
166 | + /** |
|
167 | + * Build input id based on the name |
|
168 | + * @return string |
|
169 | + */ |
|
170 | + function get_field_id() { |
|
171 | + if( isset( $this->field['id'] ) ) { |
|
172 | + return esc_attr( $this->field['id'] ); |
|
173 | + } |
|
174 | + return esc_attr( sanitize_html_class( $this->name ) ); |
|
175 | + } |
|
176 | + |
|
177 | + /** |
|
178 | + * Retrieve field label |
|
179 | + * @return string |
|
180 | + */ |
|
181 | + function get_field_label() { |
|
182 | + return esc_html( trim( $this->field['label'] ) ); |
|
183 | + } |
|
184 | 184 | |
185 | 185 | /** |
186 | 186 | * Retrieve field left label |
187 | - * |
|
188 | - * @since 1.7 |
|
189 | - * |
|
187 | + * |
|
188 | + * @since 1.7 |
|
189 | + * |
|
190 | 190 | * @return string |
191 | 191 | */ |
192 | 192 | function get_field_left_label() { |
193 | 193 | return ! empty( $this->field['left_label'] ) ? esc_html( trim( $this->field['left_label'] ) ) : NULL; |
194 | 194 | } |
195 | 195 | |
196 | - /** |
|
197 | - * Retrieve field label class |
|
198 | - * @return string |
|
199 | - */ |
|
200 | - function get_label_class() { |
|
201 | - return 'gv-label-'. sanitize_html_class( $this->field['type'] ); |
|
202 | - } |
|
203 | - |
|
204 | - |
|
205 | - /** |
|
206 | - * Retrieve field description |
|
207 | - * @return string |
|
208 | - */ |
|
209 | - function get_field_desc() { |
|
210 | - return !empty( $this->field['desc'] ) ? '<span class="howto">'. $this->field['desc'] .'</span>' : ''; |
|
211 | - } |
|
212 | - |
|
213 | - |
|
214 | - /** |
|
215 | - * Verify if field should have merge tags |
|
216 | - * @return boolean |
|
217 | - */ |
|
218 | - function show_merge_tags() { |
|
219 | - // Show the merge tags if the field is a list view |
|
220 | - $is_list = preg_match( '/_list-/ism', $this->name ); |
|
221 | - // Or is a single entry view |
|
222 | - $is_single = preg_match( '/single_/ism', $this->name ); |
|
223 | - |
|
224 | - return ( $is_single || $is_list ); |
|
225 | - } |
|
226 | - |
|
227 | - |
|
228 | - |
|
229 | - /** |
|
230 | - * important! Override this class |
|
231 | - * outputs the field option html |
|
232 | - */ |
|
233 | - function render_option() { |
|
234 | - // to replace on each field |
|
235 | - } |
|
236 | - |
|
237 | - /** |
|
238 | - * important! Override this class if needed |
|
239 | - * outputs the field setting html |
|
240 | - */ |
|
241 | - function render_setting( $override_input = NULL ) { |
|
242 | - |
|
243 | - if( !empty( $this->field['full_width'] ) ) { ?> |
|
196 | + /** |
|
197 | + * Retrieve field label class |
|
198 | + * @return string |
|
199 | + */ |
|
200 | + function get_label_class() { |
|
201 | + return 'gv-label-'. sanitize_html_class( $this->field['type'] ); |
|
202 | + } |
|
203 | + |
|
204 | + |
|
205 | + /** |
|
206 | + * Retrieve field description |
|
207 | + * @return string |
|
208 | + */ |
|
209 | + function get_field_desc() { |
|
210 | + return !empty( $this->field['desc'] ) ? '<span class="howto">'. $this->field['desc'] .'</span>' : ''; |
|
211 | + } |
|
212 | + |
|
213 | + |
|
214 | + /** |
|
215 | + * Verify if field should have merge tags |
|
216 | + * @return boolean |
|
217 | + */ |
|
218 | + function show_merge_tags() { |
|
219 | + // Show the merge tags if the field is a list view |
|
220 | + $is_list = preg_match( '/_list-/ism', $this->name ); |
|
221 | + // Or is a single entry view |
|
222 | + $is_single = preg_match( '/single_/ism', $this->name ); |
|
223 | + |
|
224 | + return ( $is_single || $is_list ); |
|
225 | + } |
|
226 | + |
|
227 | + |
|
228 | + |
|
229 | + /** |
|
230 | + * important! Override this class |
|
231 | + * outputs the field option html |
|
232 | + */ |
|
233 | + function render_option() { |
|
234 | + // to replace on each field |
|
235 | + } |
|
236 | + |
|
237 | + /** |
|
238 | + * important! Override this class if needed |
|
239 | + * outputs the field setting html |
|
240 | + */ |
|
241 | + function render_setting( $override_input = NULL ) { |
|
242 | + |
|
243 | + if( !empty( $this->field['full_width'] ) ) { ?> |
|
244 | 244 | <th scope="row" colspan="2"> |
245 | 245 | <div> |
246 | 246 | <label for="<?php echo $this->get_field_id(); ?>"> |
@@ -260,14 +260,14 @@ discard block |
||
260 | 260 | </td> |
261 | 261 | <?php } |
262 | 262 | |
263 | - } |
|
263 | + } |
|
264 | 264 | |
265 | - /** |
|
266 | - * important! Override this class |
|
267 | - * outputs the input html part |
|
268 | - */ |
|
269 | - function render_input( $override_input ) { |
|
270 | - echo ''; |
|
271 | - } |
|
265 | + /** |
|
266 | + * important! Override this class |
|
267 | + * outputs the input html part |
|
268 | + */ |
|
269 | + function render_input( $override_input ) { |
|
270 | + echo ''; |
|
271 | + } |
|
272 | 272 | |
273 | 273 | } |
@@ -532,7 +532,7 @@ |
||
532 | 532 | * @since 1.16.4 |
533 | 533 | * @param int $entry_id ID of the Gravity Forms entry |
534 | 534 | * @param array $entry Deleted entry array |
535 | - */ |
|
535 | + */ |
|
536 | 536 | do_action( 'gravityview/delete-entry/deleted', $entry_id, $entry ); |
537 | 537 | } |
538 | 538 |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | * |
271 | 271 | * Verify permissions. Check expected $_POST. Parse args, then send to process_delete_notes |
272 | 272 | * |
273 | - * @since 1.17 |
|
273 | + * @since 1.17 |
|
274 | 274 | * |
275 | 275 | * @see process_delete_notes |
276 | 276 | * |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | 'subject-label' => __( 'Subject', 'gravityview' ), |
424 | 424 | 'subject' => __( 'Email subject', 'gravityview' ), |
425 | 425 | 'default-email-subject' => __( 'New entry note', 'gravityview' ), |
426 | - 'email-footer' => __( 'This note was sent from {url}', 'gravityview' ), |
|
426 | + 'email-footer' => __( 'This note was sent from {url}', 'gravityview' ), |
|
427 | 427 | 'also-email' => __( 'Also email this note to', 'gravityview' ), |
428 | 428 | 'error-add-note' => __( 'There was an error adding the note.', 'gravityview' ), |
429 | 429 | 'error-invalid' => __( 'The request was invalid. Refresh the page and try again.', 'gravityview' ), |
@@ -493,11 +493,11 @@ discard block |
||
493 | 493 | |
494 | 494 | if ( $context instanceof \GV\Template_Context ) { |
495 | 495 | |
496 | - ob_start(); |
|
497 | - $context->template->get_template_part( 'note', 'detail', true ); |
|
498 | - $note_detail_html = ob_get_clean(); |
|
496 | + ob_start(); |
|
497 | + $context->template->get_template_part( 'note', 'detail', true ); |
|
498 | + $note_detail_html = ob_get_clean(); |
|
499 | 499 | |
500 | - ob_start(); |
|
500 | + ob_start(); |
|
501 | 501 | $context->template->get_template_part( 'note', $note_row_template, true ); |
502 | 502 | $note_row = ob_get_clean(); |
503 | 503 | } else { |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | 'gv-note-to-custom' => '', |
757 | 757 | 'gv-note-subject' => '', |
758 | 758 | 'gv-note-content' => '', |
759 | - 'current-url' => '', |
|
759 | + 'current-url' => '', |
|
760 | 760 | ); |
761 | 761 | |
762 | 762 | $current_user = wp_get_current_user(); |
@@ -808,9 +808,9 @@ discard block |
||
808 | 808 | $message .= $this->get_email_footer( $email_footer, $is_html, $email_data ); |
809 | 809 | |
810 | 810 | /** |
811 | - * @filter `gravityview/field/notes/wpautop_email` Should the message content have paragraphs added automatically, if using HTML message format |
|
811 | + * @filter `gravityview/field/notes/wpautop_email` Should the message content have paragraphs added automatically, if using HTML message format |
|
812 | 812 | * @since 1.18 |
813 | - * @param bool $wpautop_email True: Apply wpautop() to the email message if using; False: Leave as entered (Default: true) |
|
813 | + * @param bool $wpautop_email True: Apply wpautop() to the email message if using; False: Leave as entered (Default: true) |
|
814 | 814 | */ |
815 | 815 | $wpautop_email = apply_filters( 'gravityview/field/notes/wpautop_email', true ); |
816 | 816 | |
@@ -830,12 +830,12 @@ discard block |
||
830 | 830 | } |
831 | 831 | |
832 | 832 | /** |
833 | - * Get the footer for Entry Note emails |
|
834 | - * |
|
835 | - * `{url}` is replaced by the URL of the page where the note form was embedded |
|
836 | - * |
|
837 | - * @since 1.18 |
|
838 | - * @see GravityView_Field_Notes::strings The default value of $message_footer is set here, with the key 'email-footer' |
|
833 | + * Get the footer for Entry Note emails |
|
834 | + * |
|
835 | + * `{url}` is replaced by the URL of the page where the note form was embedded |
|
836 | + * |
|
837 | + * @since 1.18 |
|
838 | + * @see GravityView_Field_Notes::strings The default value of $message_footer is set here, with the key 'email-footer' |
|
839 | 839 | * |
840 | 840 | * @param string $email_footer The message footer value |
841 | 841 | * @param bool $is_html True: Email is being sent as HTML; False: sent as text |
@@ -844,10 +844,10 @@ discard block |
||
844 | 844 | */ |
845 | 845 | private function get_email_footer( $email_footer = '', $is_html = true, $email_data = array() ) { |
846 | 846 | |
847 | - $output = ''; |
|
847 | + $output = ''; |
|
848 | 848 | |
849 | 849 | if( ! empty( $email_footer ) ) { |
850 | - $url = \GV\Utils::get( $email_data, 'current-url' ); |
|
850 | + $url = \GV\Utils::get( $email_data, 'current-url' ); |
|
851 | 851 | $url = html_entity_decode( $url ); |
852 | 852 | $url = site_url( $url ); |
853 | 853 |
@@ -240,7 +240,7 @@ |
||
240 | 240 | self::$notices['wp_version'] = array( |
241 | 241 | 'class' => 'error', |
242 | 242 | 'message' => sprintf( __( "%sGravityView requires WordPress %s or newer.%s \n\nYou're using Version %s. Please upgrade your WordPress installation.", 'gravityview' ), '<h3>', GV_MIN_WP_VERSION, "</h3>\n\n", '<span style="font-family: Consolas, Courier, monospace;">' . $wp_version . '</span>' ), |
243 | - 'cap' => 'update_core', |
|
243 | + 'cap' => 'update_core', |
|
244 | 244 | 'dismiss' => 'wp_version', |
245 | 245 | ); |
246 | 246 |
@@ -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' ) { |
|
32 | - $class .= ' merge-tag-support mt-position-right '; |
|
31 | + if( $show_mt && $this->field['merge_tags'] !== false || $this->field['merge_tags'] === 'force' ) { |
|
32 | + $class .= ' merge-tag-support mt-position-right '; |
|
33 | 33 | |
34 | - if( empty( $this->field['show_all_fields'] ) ) { |
|
35 | - $class .= ' mt-hide_all_fields '; |
|
36 | - } |
|
37 | - } |
|
34 | + if( empty( $this->field['show_all_fields'] ) ) { |
|
35 | + $class .= ' mt-hide_all_fields '; |
|
36 | + } |
|
37 | + } |
|
38 | 38 | |
39 | 39 | $class .= rgar( $this->field, 'class' ); |
40 | 40 | $placeholder = rgar( $this->field, 'placeholder' ); |
@@ -55,20 +55,20 @@ discard block |
||
55 | 55 | |
56 | 56 | function codemirror( $field_id = '' ) { |
57 | 57 | |
58 | - // Enqueue code editor and settings for manipulating HTML. |
|
59 | - $settings = wp_enqueue_code_editor( array( 'type' => 'text/html' ) ); |
|
58 | + // Enqueue code editor and settings for manipulating HTML. |
|
59 | + $settings = wp_enqueue_code_editor( array( 'type' => 'text/html' ) ); |
|
60 | 60 | |
61 | - // Bail if user disabled CodeMirror. |
|
62 | - if ( false === $settings ) { |
|
63 | - return; |
|
64 | - } |
|
61 | + // Bail if user disabled CodeMirror. |
|
62 | + if ( false === $settings ) { |
|
63 | + return; |
|
64 | + } |
|
65 | 65 | |
66 | - ?> |
|
66 | + ?> |
|
67 | 67 | |
68 | 68 | <script> |
69 | 69 | wp.codeEditor.initialize( "<?php echo $field_id;?>", {}); |
70 | 70 | </script> |
71 | 71 | <?php |
72 | - } |
|
72 | + } |
|
73 | 73 | |
74 | 74 | } |