@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | |
12 | 12 | var $is_searchable = true; |
13 | 13 | |
14 | - var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains'); |
|
14 | + var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains' ); |
|
15 | 15 | |
16 | 16 | var $_gf_field_class_name = 'GF_Field_Post_Category'; |
17 | 17 | |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $entry = GFAPI::get_entry( $entry_id ); |
47 | 47 | $post_id = \GV\Utils::get( $entry, 'post_id' ); |
48 | 48 | |
49 | - if( empty( $post_id ) ) { |
|
49 | + if ( empty( $post_id ) ) { |
|
50 | 50 | return false; |
51 | 51 | } |
52 | 52 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | |
55 | 55 | $post_category_fields = GFAPI::get_fields_by_type( $form, 'post_category' ); |
56 | 56 | |
57 | - if( $post_category_fields ) { |
|
57 | + if ( $post_category_fields ) { |
|
58 | 58 | |
59 | 59 | $updated_categories = array(); |
60 | 60 | |
@@ -121,18 +121,18 @@ discard block |
||
121 | 121 | * |
122 | 122 | * @return mixed |
123 | 123 | */ |
124 | - function edit_entry_post_category_choices( $choices, $field, $form_id ) { |
|
124 | + function edit_entry_post_category_choices( $choices, $field, $form_id ) { |
|
125 | 125 | |
126 | - $entry = GravityView_Edit_Entry::getInstance()->instances['render']->get_entry(); |
|
126 | + $entry = GravityView_Edit_Entry::getInstance()->instances[ 'render' ]->get_entry(); |
|
127 | 127 | |
128 | 128 | // $entry['post_id'] should always be set, but we check to make sure. |
129 | - if( $entry && isset( $entry['post_id'] ) && $post_id = $entry['post_id'] ) { |
|
129 | + if ( $entry && isset( $entry[ 'post_id' ] ) && $post_id = $entry[ 'post_id' ] ) { |
|
130 | 130 | |
131 | 131 | $post_categories = wp_get_post_categories( $post_id, array( 'fields' => 'ids' ) ); |
132 | 132 | |
133 | 133 | // Always use the live value |
134 | 134 | foreach ( $choices as &$choice ) { |
135 | - $choice['isSelected'] = in_array( $choice['value'], array_values( $post_categories ) ); |
|
135 | + $choice[ 'isSelected' ] = in_array( $choice[ 'value' ], array_values( $post_categories ) ); |
|
136 | 136 | } |
137 | 137 | } |
138 | 138 | |
@@ -141,15 +141,15 @@ discard block |
||
141 | 141 | |
142 | 142 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
143 | 143 | |
144 | - if( 'edit' === $context ) { |
|
144 | + if ( 'edit' === $context ) { |
|
145 | 145 | return $field_options; |
146 | 146 | } |
147 | 147 | |
148 | - $this->add_field_support('dynamic_data', $field_options ); |
|
149 | - $this->add_field_support('link_to_term', $field_options ); |
|
150 | - $this->add_field_support('new_window', $field_options ); |
|
148 | + $this->add_field_support( 'dynamic_data', $field_options ); |
|
149 | + $this->add_field_support( 'link_to_term', $field_options ); |
|
150 | + $this->add_field_support( 'new_window', $field_options ); |
|
151 | 151 | |
152 | - $field_options['new_window']['requires'] = 'link_to_term'; |
|
152 | + $field_options[ 'new_window' ][ 'requires' ] = 'link_to_term'; |
|
153 | 153 | |
154 | 154 | return $field_options; |
155 | 155 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | var $is_searchable = true; |
16 | 16 | |
17 | - var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains'); |
|
17 | + var $search_operators = array( 'is', 'in', 'not in', 'isnot', 'contains' ); |
|
18 | 18 | |
19 | 19 | var $_gf_field_class_name = 'GF_Field_Post_Tags'; |
20 | 20 | |
@@ -29,15 +29,15 @@ discard block |
||
29 | 29 | |
30 | 30 | public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) { |
31 | 31 | |
32 | - if( 'edit' === $context ) { |
|
32 | + if ( 'edit' === $context ) { |
|
33 | 33 | return $field_options; |
34 | 34 | } |
35 | 35 | |
36 | - $this->add_field_support('dynamic_data', $field_options ); |
|
37 | - $this->add_field_support('link_to_term', $field_options ); |
|
38 | - $this->add_field_support('new_window', $field_options ); |
|
36 | + $this->add_field_support( 'dynamic_data', $field_options ); |
|
37 | + $this->add_field_support( 'link_to_term', $field_options ); |
|
38 | + $this->add_field_support( 'new_window', $field_options ); |
|
39 | 39 | |
40 | - $field_options['new_window']['requires'] = 'link_to_term'; |
|
40 | + $field_options[ 'new_window' ][ 'requires' ] = 'link_to_term'; |
|
41 | 41 | |
42 | 42 | return $field_options; |
43 | 43 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | if ( 'single' === $context ) { |
36 | - unset( $field_options['new_window'] ); |
|
36 | + unset( $field_options[ 'new_window' ] ); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | return $field_options; |
@@ -16,17 +16,17 @@ |
||
16 | 16 | */ |
17 | 17 | function gravityview_register_gravityview_widgets() { |
18 | 18 | |
19 | - include_once( GRAVITYVIEW_DIR .'includes/widgets/class-gravityview-widget.php' ); |
|
19 | + include_once( GRAVITYVIEW_DIR . 'includes/widgets/class-gravityview-widget.php' ); |
|
20 | 20 | |
21 | - include_once( GRAVITYVIEW_DIR .'includes/widgets/search-widget/class-search-widget.php' ); |
|
22 | - include_once( GRAVITYVIEW_DIR .'includes/widgets/class-gravityview-widget-custom-content.php' ); |
|
23 | - include_once( GRAVITYVIEW_DIR .'includes/widgets/class-gravityview-widget-gravityforms.php' ); |
|
24 | - include_once( GRAVITYVIEW_DIR .'includes/widgets/class-gravityview-widget-page-size.php' ); |
|
25 | - include_once( GRAVITYVIEW_DIR .'includes/widgets/class-gravityview-widget-pagination-info.php' ); |
|
26 | - include_once( GRAVITYVIEW_DIR .'includes/widgets/class-gravityview-widget-page-links.php' ); |
|
21 | + include_once( GRAVITYVIEW_DIR . 'includes/widgets/search-widget/class-search-widget.php' ); |
|
22 | + include_once( GRAVITYVIEW_DIR . 'includes/widgets/class-gravityview-widget-custom-content.php' ); |
|
23 | + include_once( GRAVITYVIEW_DIR . 'includes/widgets/class-gravityview-widget-gravityforms.php' ); |
|
24 | + include_once( GRAVITYVIEW_DIR . 'includes/widgets/class-gravityview-widget-page-size.php' ); |
|
25 | + include_once( GRAVITYVIEW_DIR . 'includes/widgets/class-gravityview-widget-pagination-info.php' ); |
|
26 | + include_once( GRAVITYVIEW_DIR . 'includes/widgets/class-gravityview-widget-page-links.php' ); |
|
27 | 27 | |
28 | - if( class_exists('GFPolls') ) { |
|
29 | - include_once( GRAVITYVIEW_DIR .'includes/widgets/poll/class-gravityview-widget-poll.php' ); |
|
28 | + if ( class_exists( 'GFPolls' ) ) { |
|
29 | + include_once( GRAVITYVIEW_DIR . 'includes/widgets/poll/class-gravityview-widget-poll.php' ); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | } |
@@ -61,8 +61,8 @@ discard block |
||
61 | 61 | $value = $this->get_value( $atts ); |
62 | 62 | |
63 | 63 | if ( false === $operator && is_null( $value ) ) { |
64 | - if ( false !== $atts['if'] ) { // Only-if test |
|
65 | - $match = $authed && ! in_array( strtolower( $atts['if'] ), array( '', '0', 'false', 'no' ) ); |
|
64 | + if ( false !== $atts[ 'if' ] ) { // Only-if test |
|
65 | + $match = $authed && ! in_array( strtolower( $atts[ 'if' ] ), array( '', '0', 'false', 'no' ) ); |
|
66 | 66 | } else { |
67 | 67 | $match = $authed; // Just login test |
68 | 68 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | // Need to match all AND |
83 | 83 | foreach ( $and_values as $and_value ) { |
84 | - $match = $authed && \GVCommon::matches_operation( $atts['if'], $and_value, $operator ); |
|
84 | + $match = $authed && \GVCommon::matches_operation( $atts[ 'if' ], $and_value, $operator ); |
|
85 | 85 | if ( ! $match ) { |
86 | 86 | break; |
87 | 87 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | // Only need to match a single OR |
93 | 93 | foreach ( $or_values as $or_value ) { |
94 | 94 | |
95 | - $match = \GVCommon::matches_operation( $atts['if'], $or_value, $operator ); |
|
95 | + $match = \GVCommon::matches_operation( $atts[ 'if' ], $or_value, $operator ); |
|
96 | 96 | |
97 | 97 | // Negate the negative operators |
98 | 98 | if ( ( $authed && $match ) || ( $authed && ( ! $match && in_array( $operator, array( 'isnot', 'not_contains', 'not_in' ) ) ) ) ) { |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | } |
102 | 102 | |
103 | 103 | } else { |
104 | - $match = $authed && \GVCommon::matches_operation( $atts['if'], $value, $operator ); |
|
104 | + $match = $authed && \GVCommon::matches_operation( $atts[ 'if' ], $value, $operator ); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | $output = $this->get_output( $match, $atts, $output ); |
@@ -189,8 +189,8 @@ discard block |
||
189 | 189 | * @return string The output. |
190 | 190 | */ |
191 | 191 | private function get_output( $match, $atts, $content ) { |
192 | - if ( ! $match && ! empty( $atts['else'] ) ) { |
|
193 | - return $atts['else']; // Attributized else is easy :) |
|
192 | + if ( ! $match && ! empty( $atts[ 'else' ] ) ) { |
|
193 | + return $atts[ 'else' ]; // Attributized else is easy :) |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | $if = ''; |
@@ -317,18 +317,18 @@ discard block |
||
317 | 317 | $atts = array_intersect_key( $supplied_atts, $atts ); |
318 | 318 | |
319 | 319 | // Strip whitespace if it's not default false |
320 | - if ( isset( $atts['if'] ) && is_string( $atts['if'] ) ) { |
|
321 | - $atts['if'] = trim( $atts['if'] ); |
|
320 | + if ( isset( $atts[ 'if' ] ) && is_string( $atts[ 'if' ] ) ) { |
|
321 | + $atts[ 'if' ] = trim( $atts[ 'if' ] ); |
|
322 | 322 | } else { |
323 | - $atts['if'] = false; |
|
323 | + $atts[ 'if' ] = false; |
|
324 | 324 | } |
325 | 325 | |
326 | - if ( isset( $atts['logged_in'] ) ) { |
|
326 | + if ( isset( $atts[ 'logged_in' ] ) ) { |
|
327 | 327 | // Truthy |
328 | - if ( in_array( strtolower( $atts['logged_in'] ), array( '0', 'false', 'no' ) ) ) { |
|
329 | - $atts['logged_in'] = false; |
|
328 | + if ( in_array( strtolower( $atts[ 'logged_in' ] ), array( '0', 'false', 'no' ) ) ) { |
|
329 | + $atts[ 'logged_in' ] = false; |
|
330 | 330 | } else { |
331 | - $atts['logged_in'] = true; |
|
331 | + $atts[ 'logged_in' ] = true; |
|
332 | 332 | } |
333 | 333 | } |
334 | 334 |
@@ -61,14 +61,16 @@ discard block |
||
61 | 61 | $value = $this->get_value( $atts ); |
62 | 62 | |
63 | 63 | if ( false === $operator && is_null( $value ) ) { |
64 | - if ( false !== $atts['if'] ) { // Only-if test |
|
64 | + if ( false !== $atts['if'] ) { |
|
65 | +// Only-if test |
|
65 | 66 | $match = $authed && ! in_array( strtolower( $atts['if'] ), array( '', '0', 'false', 'no' ) ); |
66 | 67 | } else { |
67 | 68 | $match = $authed; // Just login test |
68 | 69 | } |
69 | 70 | |
70 | 71 | $output = $this->get_output( $match, $atts, $content ); |
71 | - } else { // Regular test |
|
72 | + } else { |
|
73 | +// Regular test |
|
72 | 74 | |
73 | 75 | $output = $content; |
74 | 76 | |
@@ -199,12 +201,15 @@ discard block |
||
199 | 201 | $opens = 0; // inner opens |
200 | 202 | $found = false; // found split position |
201 | 203 | |
202 | - while ( $content ) { // scan |
|
204 | + while ( $content ) { |
|
205 | +// scan |
|
203 | 206 | |
204 | 207 | if ( ! preg_match( '#(.*?)(\[\/?(gvlogic|else).*?])(.*)#s', $content, $matches ) ) { |
205 | - if ( ! $found ) { // We're still iffing. |
|
208 | + if ( ! $found ) { |
|
209 | +// We're still iffing. |
|
206 | 210 | $if .= $content; |
207 | - } else { // We are elsing |
|
211 | + } else { |
|
212 | +// We are elsing |
|
208 | 213 | $else .= $content; |
209 | 214 | } |
210 | 215 | break; // No more shortcodes |
@@ -212,9 +217,11 @@ discard block |
||
212 | 217 | |
213 | 218 | list( $_, $before_shortcode, $shortcode, $_, $after_shortcode ) = $matches; |
214 | 219 | |
215 | - if ( ! $found ) { // We're still iffing. |
|
220 | + if ( ! $found ) { |
|
221 | +// We're still iffing. |
|
216 | 222 | $if .= $before_shortcode; |
217 | - } else { // We are elsing |
|
223 | + } else { |
|
224 | +// We are elsing |
|
218 | 225 | $else .= $before_shortcode; |
219 | 226 | } |
220 | 227 | |
@@ -238,9 +245,11 @@ discard block |
||
238 | 245 | } |
239 | 246 | |
240 | 247 | // Tack on the shortcode |
241 | - if ( ! $found ) { // We're still iffing. |
|
248 | + if ( ! $found ) { |
|
249 | +// We're still iffing. |
|
242 | 250 | $if .= $shortcode; |
243 | - } else { // We are elsing |
|
251 | + } else { |
|
252 | +// We are elsing |
|
244 | 253 | $else .= $shortcode; |
245 | 254 | } |
246 | 255 | } |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | add_filter( 'gravityview/fields/fileupload/link_atts', array( $this, 'fileupload_link_atts' ), 10, 4 ); |
24 | 24 | add_filter( 'gravityview/get_link/allowed_atts', array( $this, 'allowed_atts' ) ); |
25 | 25 | |
26 | - add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts') ); |
|
27 | - add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles') ); |
|
26 | + add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); |
|
27 | + add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) ); |
|
28 | 28 | |
29 | 29 | add_action( 'gravityview/template/after', array( $this, 'print_scripts' ) ); |
30 | 30 | |
@@ -92,8 +92,8 @@ discard block |
||
92 | 92 | remove_filter( 'gravityview/fields/fileupload/link_atts', array( $this, 'fileupload_link_atts' ), 10 ); |
93 | 93 | remove_filter( 'gravityview/get_link/allowed_atts', array( $this, 'allowed_atts' ) ); |
94 | 94 | |
95 | - remove_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts') ); |
|
96 | - remove_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles') ); |
|
95 | + remove_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); |
|
96 | + remove_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) ); |
|
97 | 97 | |
98 | 98 | remove_action( 'wp_footer', array( $this, 'output_footer' ) ); |
99 | 99 | } |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | if ( ! $detailed ) { |
556 | 556 | $defaults = array(); |
557 | 557 | foreach ( $default_settings as $key => $value ) { |
558 | - $defaults[ $key ] = $value['value']; |
|
558 | + $defaults[ $key ] = $value[ 'value' ]; |
|
559 | 559 | } |
560 | 560 | return $defaults; |
561 | 561 | |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | // If the $group argument is set for the method, |
567 | 567 | // ignore any settings that aren't in that group. |
568 | 568 | if ( ! empty( $group ) && is_string( $group ) ) { |
569 | - if ( empty( $value['group'] ) || $value['group'] !== $group ) { |
|
569 | + if ( empty( $value[ 'group' ] ) || $value[ 'group' ] !== $group ) { |
|
570 | 570 | unset( $default_settings[ $key ] ); |
571 | 571 | } |
572 | 572 | } |
@@ -20,16 +20,16 @@ discard block |
||
20 | 20 | <div id="publishing-action"> |
21 | 21 | <?php |
22 | 22 | |
23 | - /** |
|
24 | - * @filter `gravityview/edit_entry/cancel_link` Modify the cancel button link URL |
|
25 | - * @since 1.11.1 |
|
26 | - * @since 2.11 The cancel link now uses history.back() so the $back_link URL matters less. |
|
27 | - * @param string $back_link Existing URL of the Cancel link |
|
28 | - * @param array $form The Gravity Forms form |
|
29 | - * @param array $entry The Gravity Forms entry |
|
30 | - * @param int $view_id The current View ID |
|
31 | - */ |
|
32 | - $back_link = apply_filters( 'gravityview/edit_entry/cancel_link', remove_query_arg( array( 'page', 'view', 'edit' ) ), $object->form, $object->entry, $object->view_id ); |
|
23 | + /** |
|
24 | + * @filter `gravityview/edit_entry/cancel_link` Modify the cancel button link URL |
|
25 | + * @since 1.11.1 |
|
26 | + * @since 2.11 The cancel link now uses history.back() so the $back_link URL matters less. |
|
27 | + * @param string $back_link Existing URL of the Cancel link |
|
28 | + * @param array $form The Gravity Forms form |
|
29 | + * @param array $entry The Gravity Forms entry |
|
30 | + * @param int $view_id The current View ID |
|
31 | + */ |
|
32 | + $back_link = apply_filters( 'gravityview/edit_entry/cancel_link', remove_query_arg( array( 'page', 'view', 'edit' ) ), $object->form, $object->entry, $object->view_id ); |
|
33 | 33 | |
34 | 34 | /** |
35 | 35 | * @action `gravityview/edit-entry/publishing-action/before` Triggered before the submit buttons in the Edit Entry screen, inside the `<div id="publishing-action">` container. |
@@ -84,11 +84,11 @@ discard block |
||
84 | 84 | * @used-by GravityView_Delete_Entry::add_delete_button() |
85 | 85 | * |
86 | 86 | * @since 1.5.1 |
87 | - * @since 2.0.13 Added $post_id |
|
87 | + * @since 2.0.13 Added $post_id |
|
88 | 88 | * @param array $form The Gravity Forms form |
89 | 89 | * @param array $entry The Gravity Forms entry |
90 | 90 | * @param int $view_id The current View ID |
91 | - * @param int $post_id The current Post ID |
|
91 | + * @param int $post_id The current Post ID |
|
92 | 92 | */ |
93 | 93 | do_action( 'gravityview/edit-entry/publishing-action/after', $object->form, $object->entry, $object->view_id, $object->post_id ); |
94 | 94 | ?> |
@@ -44,35 +44,35 @@ discard block |
||
44 | 44 | |
45 | 45 | if ( $object->show_previous_button ) { |
46 | 46 | $previous_tabindex = GFCommon::get_tabindex(); |
47 | - $previous_label = GFCommon::replace_variables( $labels['previous'], $object->form, $object->entry ); |
|
47 | + $previous_label = GFCommon::replace_variables( $labels[ 'previous' ], $object->form, $object->entry ); |
|
48 | 48 | ?> |
49 | - <input id="gform_previous_button_<?php echo esc_attr( $object->form['id'] ); ?>" class="btn btn-lg button button-large gform_button button-primary gv-button-previous" type="submit" <?php echo $previous_tabindex; ?> value="<?php echo esc_attr( $previous_label ); ?>" name="save" /> |
|
49 | + <input id="gform_previous_button_<?php echo esc_attr( $object->form[ 'id' ] ); ?>" class="btn btn-lg button button-large gform_button button-primary gv-button-previous" type="submit" <?php echo $previous_tabindex; ?> value="<?php echo esc_attr( $previous_label ); ?>" name="save" /> |
|
50 | 50 | <?php |
51 | 51 | } |
52 | 52 | |
53 | 53 | if ( $object->show_next_button ) { |
54 | - $next_tabindex = GFCommon::get_tabindex(); |
|
55 | - $next_label = GFCommon::replace_variables( $labels['next'], $object->form, $object->entry ); |
|
54 | + $next_tabindex = GFCommon::get_tabindex(); |
|
55 | + $next_label = GFCommon::replace_variables( $labels[ 'next' ], $object->form, $object->entry ); |
|
56 | 56 | ?> |
57 | - <input id="gform_next_button_<?php echo esc_attr( $object->form['id'] ); ?>" class="btn btn-lg button button-large gform_button button-primary gv-button-next" type="submit" <?php echo $next_tabindex; ?> value="<?php echo esc_attr( $next_label ); ?>" name="save" /> |
|
57 | + <input id="gform_next_button_<?php echo esc_attr( $object->form[ 'id' ] ); ?>" class="btn btn-lg button button-large gform_button button-primary gv-button-next" type="submit" <?php echo $next_tabindex; ?> value="<?php echo esc_attr( $next_label ); ?>" name="save" /> |
|
58 | 58 | <?php |
59 | 59 | } |
60 | 60 | |
61 | 61 | if ( $object->show_update_button ) { |
62 | - $update_tabindex = GFCommon::get_tabindex(); |
|
63 | - $update_label = GFCommon::replace_variables( $labels['submit'], $object->form, $object->entry ); |
|
62 | + $update_tabindex = GFCommon::get_tabindex(); |
|
63 | + $update_label = GFCommon::replace_variables( $labels[ 'submit' ], $object->form, $object->entry ); |
|
64 | 64 | ?> |
65 | - <input id="gform_submit_button_<?php echo esc_attr( $object->form['id'] ); ?>" class="btn btn-lg button button-large gform_button button-primary gv-button-update" type="submit" <?php echo $update_tabindex; ?> value="<?php echo esc_attr( $update_label ); ?>" name="save" /> |
|
65 | + <input id="gform_submit_button_<?php echo esc_attr( $object->form[ 'id' ] ); ?>" class="btn btn-lg button button-large gform_button button-primary gv-button-update" type="submit" <?php echo $update_tabindex; ?> value="<?php echo esc_attr( $update_label ); ?>" name="save" /> |
|
66 | 66 | <?php |
67 | 67 | } |
68 | 68 | |
69 | - $cancel_tabindex = GFCommon::get_tabindex(); |
|
70 | - $cancel_label = GFCommon::replace_variables( $labels['cancel'], $object->form, $object->entry ); |
|
69 | + $cancel_tabindex = GFCommon::get_tabindex(); |
|
70 | + $cancel_label = GFCommon::replace_variables( $labels[ 'cancel' ], $object->form, $object->entry ); |
|
71 | 71 | |
72 | 72 | // If the entry has been edited, history.back() will keep pointing to the Edit Entry screen. Go back before editing, please! |
73 | 73 | // On first visit, will be history.go(-1) because (0 + 1 * -1). |
74 | 74 | // After updating twice, history.go(-3) because (2 + 1 * -1) |
75 | - $update_count = (int) \GV\Utils::_POST( 'update_count', 0 ); |
|
75 | + $update_count = (int)\GV\Utils::_POST( 'update_count', 0 ); |
|
76 | 76 | |
77 | 77 | /** |
78 | 78 | * @filter `gravityview/edit_entry/cancel_onclick` Modify the `onclick` attribute for the back link. To remove `onclick` altogether, return an empty string. |
@@ -106,5 +106,5 @@ discard block |
||
106 | 106 | ?> |
107 | 107 | <input type='hidden' name='update_count' value='<?php echo $update_count + 1; ?>'/> |
108 | 108 | <input type="hidden" name="action" value="update" /> |
109 | - <input type="hidden" name="lid" value="<?php echo esc_attr( $object->entry['id'] ); ?>" /> |
|
109 | + <input type="hidden" name="lid" value="<?php echo esc_attr( $object->entry[ 'id' ] ); ?>" /> |
|
110 | 110 | </div> |
@@ -114,14 +114,14 @@ |
||
114 | 114 | /** Require critical legacy core files. @todo Deprecate */ |
115 | 115 | require_once $this->plugin->dir( 'includes/import-functions.php' ); |
116 | 116 | require_once $this->plugin->dir( 'includes/helper-functions.php' ); |
117 | - require_once $this->plugin->dir( 'includes/class-common.php'); |
|
118 | - require_once $this->plugin->dir( 'includes/connector-functions.php'); |
|
117 | + require_once $this->plugin->dir( 'includes/class-common.php' ); |
|
118 | + require_once $this->plugin->dir( 'includes/connector-functions.php' ); |
|
119 | 119 | require_once $this->plugin->dir( 'includes/class-gravityview-compatibility.php' ); |
120 | 120 | require_once $this->plugin->dir( 'includes/class-gravityview-roles-capabilities.php' ); |
121 | 121 | require_once $this->plugin->dir( 'includes/class-gravityview-admin-notices.php' ); |
122 | 122 | require_once $this->plugin->dir( 'includes/class-admin.php' ); |
123 | - require_once $this->plugin->dir( 'includes/class-post-types.php'); |
|
124 | - require_once $this->plugin->dir( 'includes/class-cache.php'); |
|
123 | + require_once $this->plugin->dir( 'includes/class-post-types.php' ); |
|
124 | + require_once $this->plugin->dir( 'includes/class-cache.php' ); |
|
125 | 125 | |
126 | 126 | /** |
127 | 127 | * GravityView extensions and widgets. |