Completed
Push — develop ( 177769...43d0d5 )
by Zack
18:22
created
includes/class-data.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 		if ( ! empty( $passed_post ) ) {
22 22
 			$id_or_id_array = $this->maybe_get_view_id( $passed_post );
23
-			foreach( is_array( $id_or_id_array ) ? $id_or_id_array : array( $id_or_id_array ) as $view_id ) {
23
+			foreach ( is_array( $id_or_id_array ) ? $id_or_id_array : array( $id_or_id_array ) as $view_id ) {
24 24
 				if ( \GV\View::exists( $view_id ) && ! $this->views->contains( $view_id ) ) {
25 25
 					$this->views->add( \GV\View::by_id( $view_id ) );
26 26
 				}
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 			foreach ( $passed_post as &$post ) {
79 79
 				$views = \GV\View_Collection::from_post( $post );
80 80
 				foreach ( $views->all() as $view ) {
81
-					$ids []= $view->ID;
81
+					$ids [ ] = $view->ID;
82 82
 
83 83
 					/** And as a side-effect... add each view to the global scope. */
84 84
 					if ( ! $this->views->contains( $view->ID ) ) {
@@ -92,18 +92,18 @@  discard block
 block discarded – undo
92 92
 			if ( is_string( $passed_post ) ) {
93 93
 				$shortcodes = \GV\Shortcode::parse( $passed_post );
94 94
 				foreach ( $shortcodes as $shortcode ) {
95
-					if ( $shortcode->name == 'gravityview' && !empty( $shortcode->atts['id'] ) ) {
96
-						$ids []= $shortcode->atts['id'];
95
+					if ( $shortcode->name == 'gravityview' && ! empty( $shortcode->atts[ 'id' ] ) ) {
96
+						$ids [ ] = $shortcode->atts[ 'id' ];
97 97
 
98 98
 						/** And as a side-effect... add each view to the global scope. */
99
-						if ( ! $this->views->contains( $shortcode->atts['id'] ) && \GV\View::exists( $shortcode->atts['id'] ) ) {
100
-							$this->views->add( $shortcode->atts['id'] );
99
+						if ( ! $this->views->contains( $shortcode->atts[ 'id' ] ) && \GV\View::exists( $shortcode->atts[ 'id' ] ) ) {
100
+							$this->views->add( $shortcode->atts[ 'id' ] );
101 101
 						}
102 102
 					}
103 103
 				}
104 104
 			} else {
105 105
 				$id = $this->get_id_from_atts( $passed_post );
106
-				$ids[] = intval( $id );
106
+				$ids[ ] = intval( $id );
107 107
 			}
108 108
 		}
109 109
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
 		// If it's just one ID, return that.
115 115
 		// Otherwise, return array of IDs
116
-		return ( count( $ids ) === 1 ) ? $ids[0] : $ids;
116
+		return ( count( $ids ) === 1 ) ? $ids[ 0 ] : $ids;
117 117
 	}
118 118
 
119 119
 	/**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public static function getInstance( $passed_post = NULL ) {
123 123
 
124
-		if( empty( self::$instance ) ) {
124
+		if ( empty( self::$instance ) ) {
125 125
 			self::$instance = new GravityView_View_Data( $passed_post );
126 126
 		}
127 127
 
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
 			return array();
138 138
 		}
139 139
 		return array_combine(
140
-			array_map( function ( $view ) { return $view->ID; }, $this->views->all() ),
141
-			array_map( function ( $view ) { return $view->as_data(); }, $this->views->all() )
140
+			array_map( function( $view ) { return $view->ID; }, $this->views->all() ),
141
+			array_map( function( $view ) { return $view->as_data(); }, $this->views->all() )
142 142
 		);
143 143
 	}
144 144
 
@@ -252,22 +252,22 @@  discard block
 block discarded – undo
252 252
 	public function parse_post_content( $content ) {
253 253
 		$ids = array();
254 254
 		foreach ( \GV\Shortcode::parse( $content ) as $shortcode ) {
255
-			if ( $shortcode->name == 'gravityview' && is_numeric( $shortcode->atts['id'] ) ) {
256
-				if ( \GV\View::exists( $shortcode->atts['id'] ) && ! $this->views->contains( $shortcode->atts['id'] ) ) {
257
-					$this->views->add( \GV\View::by_id( $shortcode->atts['id'] ) );
255
+			if ( $shortcode->name == 'gravityview' && is_numeric( $shortcode->atts[ 'id' ] ) ) {
256
+				if ( \GV\View::exists( $shortcode->atts[ 'id' ] ) && ! $this->views->contains( $shortcode->atts[ 'id' ] ) ) {
257
+					$this->views->add( \GV\View::by_id( $shortcode->atts[ 'id' ] ) );
258 258
 				}
259 259
 				/**
260 260
 				 * The original function outputs the ID even though it wasn't added by ::add_view()
261 261
 				 * Wether this is a bug or not remains a mystery. But we need to emulate this behavior
262 262
 				 * until better times.
263 263
 				 */
264
-				$ids []= $shortcode->atts['id'];
264
+				$ids [ ] = $shortcode->atts[ 'id' ];
265 265
 			}
266 266
 		}
267 267
 		if ( empty ( $ids ) ) {
268 268
 			return null;
269 269
 		}
270
-		return ( sizeof( $ids ) === 1 ) ? $ids[0] : $ids;
270
+		return ( sizeof( $ids ) === 1 ) ? $ids[ 0 ] : $ids;
271 271
 	}
272 272
 
273 273
 	/**
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 		// Not invalid if not set!
291 291
 		if ( empty( $post_id ) || empty( $view_id ) ) {
292 292
 
293
-			if( $empty_is_valid ) {
293
+			if ( $empty_is_valid ) {
294 294
 				return true;
295 295
 			}
296 296
 
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 			$view_ids_in_post = array_map( function( $view ) { return $view->ID; }, $views->all() );
324 324
 
325 325
 			// The post or page specified does not contain the shortcode.
326
-			if ( false === in_array( $view_id, (array) $view_ids_in_post ) ) {
326
+			if ( false === in_array( $view_id, (array)$view_ids_in_post ) ) {
327 327
 				$message = sprintf( esc_html__( 'The Post ID entered is not valid. You may have entered a post or page that does not contain the selected View. Make sure the post contains the following shortcode: %s', 'gravityview' ), '<br /><code>[gravityview id="' . intval( $view_id ) . '"]</code>' );
328 328
 			}
329 329
 		}
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 		if ( ! $message ) {
332 332
 			// It's a View
333 333
 			if ( \GV\View::exists( $post_id ) ) {
334
-				$message = esc_html__( 'The ID is already a View.', 'gravityview' );;
334
+				$message = esc_html__( 'The ID is already a View.', 'gravityview' ); ;
335 335
 			}
336 336
 		}
337 337
 
Please login to merge, or discard this patch.
future/includes/class-gv-settings-view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 				}
Please login to merge, or discard this patch.
future/includes/class-gv-plugin.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 			return;
305 305
 		}
306 306
 
307
-		$locale = apply_filters( 'plugin_locale', ( ( function_exists('get_user_locale') && is_admin() ) ? get_user_locale() : get_locale() ), 'gravityview' );
307
+		$locale = apply_filters( 'plugin_locale', ( ( function_exists( 'get_user_locale' ) && is_admin() ) ? get_user_locale() : get_locale() ), 'gravityview' );
308 308
 
309 309
 		gravityview()->log->error( sprintf( 'Unable to load textdomain for %s locale.', $locale ) );
310 310
 	}
@@ -526,8 +526,8 @@  discard block
 block discarded – undo
526 526
 	 */
527 527
 	private function get_php_version() {
528 528
 
529
-		return ! empty( $GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] ) ?
530
-			$GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] : phpversion();
529
+		return ! empty( $GLOBALS[ 'GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE' ] ) ?
530
+			$GLOBALS[ 'GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE' ] : phpversion();
531 531
 	}
532 532
 
533 533
 	/**
@@ -539,8 +539,8 @@  discard block
 block discarded – undo
539 539
 	 */
540 540
 	private function get_wordpress_version() {
541 541
 
542
-		return ! empty( $GLOBALS['GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE'] ) ?
543
-			$GLOBALS['GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE'] : $GLOBALS['wp_version'];
542
+		return ! empty( $GLOBALS[ 'GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE' ] ) ?
543
+			$GLOBALS[ 'GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE' ] : $GLOBALS[ 'wp_version' ];
544 544
 	}
545 545
 
546 546
 	/**
@@ -552,14 +552,14 @@  discard block
 block discarded – undo
552 552
 	 */
553 553
 	private function get_gravityforms_version() {
554 554
 
555
-		if ( ! class_exists( '\GFCommon' ) || ! empty( $GLOBALS['GRAVITYVIEW_TESTS_GF_INACTIVE_OVERRIDE'] ) ) {
555
+		if ( ! class_exists( '\GFCommon' ) || ! empty( $GLOBALS[ 'GRAVITYVIEW_TESTS_GF_INACTIVE_OVERRIDE' ] ) ) {
556 556
 			gravityview()->log->error( 'Gravity Forms is inactive or not installed.' );
557 557
 
558 558
 			return null;
559 559
 		}
560 560
 
561
-		return ! empty( $GLOBALS['GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE'] ) ?
562
-			$GLOBALS['GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE'] : \GFCommon::$version;
561
+		return ! empty( $GLOBALS[ 'GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE' ] ) ?
562
+			$GLOBALS[ 'GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE' ] : \GFCommon::$version;
563 563
 	}
564 564
 
565 565
 	/**
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
 		$items = get_posts( array(
606 606
 			'post_type'   => 'gravityview',
607 607
 			'post_status' => 'any',
608
-			'numberposts' => - 1,
608
+			'numberposts' => -1,
609 609
 			'fields'      => 'ids',
610 610
 		) );
611 611
 
@@ -619,9 +619,9 @@  discard block
 block discarded – undo
619 619
 		$tables = array();
620 620
 
621 621
 		if ( version_compare( \GravityView_GFFormsModel::get_database_version(), '2.3-dev-1', '>=' ) ) {
622
-			$tables [] = \GFFormsModel::get_entry_meta_table_name();
622
+			$tables [ ] = \GFFormsModel::get_entry_meta_table_name();
623 623
 		} elseif ( ! $this->is_GF_25() ) {
624
-			$tables [] = \GFFormsModel::get_lead_meta_table_name();
624
+			$tables [ ] = \GFFormsModel::get_lead_meta_table_name();
625 625
 		}
626 626
 
627 627
 		foreach ( $tables as $meta_table ) {
@@ -640,9 +640,9 @@  discard block
 block discarded – undo
640 640
 		$tables = array();
641 641
 
642 642
 		if ( version_compare( \GravityView_GFFormsModel::get_database_version(), '2.3-dev-1', '>=' ) && method_exists( 'GFFormsModel', 'get_entry_notes_table_name' ) ) {
643
-			$tables[] = \GFFormsModel::get_entry_notes_table_name();
643
+			$tables[ ] = \GFFormsModel::get_entry_notes_table_name();
644 644
 		} elseif ( ! $this->is_GF_25() ) {
645
-			$tables[] = \GFFormsModel::get_lead_notes_table_name();
645
+			$tables[ ] = \GFFormsModel::get_lead_notes_table_name();
646 646
 		}
647 647
 
648 648
 		$disapproved = __( 'Disapproved the Entry for GravityView', 'gravityview' );
Please login to merge, or discard this patch.
includes/class-gravityview-change-entry-creator.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 			array(
84 84
 				'ajaxurl'  => admin_url( 'admin-ajax.php' ),
85 85
 				'action'   => 'entry_creator_get_users',
86
-				'gf25'    => (bool) gravityview()->plugin->is_GF_25(),
86
+				'gf25'    => (bool)gravityview()->plugin->is_GF_25(),
87 87
 				'language' => array(
88 88
 					'search_placeholder' => esc_html__( 'Search by ID, login, email, or name.', 'gravityview' ),
89 89
 				),
@@ -107,11 +107,11 @@  discard block
 block discarded – undo
107 107
 			)
108 108
 		);
109 109
 
110
-		if ( ! wp_verify_nonce( $post_var['gv_nonce'], 'gv_entry_creator' ) ) {
110
+		if ( ! wp_verify_nonce( $post_var[ 'gv_nonce' ], 'gv_entry_creator' ) ) {
111 111
 			die();
112 112
 		}
113 113
 
114
-		$search_string = $post_var['q'];
114
+		$search_string = $post_var[ 'q' ];
115 115
 
116 116
 		if ( is_numeric( $search_string ) ) {
117 117
 			$user_args = array(
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 		}
159 159
 
160 160
 		// Update the entry. The `false` prevents checking Akismet; `true` disables the user updated hook from firing
161
-		$result = RGFormsModel::update_entry_property( (int) $entry['id'], 'created_by', (int) $user_id, false, true );
161
+		$result = RGFormsModel::update_entry_property( (int)$entry[ 'id' ], 'created_by', (int)$user_id, false, true );
162 162
 
163 163
 		if ( false === $result ) {
164 164
 			$status = __( 'Error', 'gravityview' );
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 			return;
181 181
 		}
182 182
 
183
-		GravityView_Entry_Notes::add_note( $entry['id'], - 1, 'GravityView', $note, 'gravityview' );
183
+		GravityView_Entry_Notes::add_note( $entry[ 'id' ], - 1, 'GravityView', $note, 'gravityview' );
184 184
 
185 185
 	}
186 186
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 		}
216 216
 
217 217
 		// If screen mode isn't set, then we're in the wrong place.
218
-		if ( empty( $_REQUEST['screen_mode'] ) ) {
218
+		if ( empty( $_REQUEST[ 'screen_mode' ] ) ) {
219 219
 			return;
220 220
 		}
221 221
 
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 
242 242
 		// If $_GET['screen_mode'] is set to edit, set $_POST value
243 243
 		if ( \GV\Utils::_GET( 'screen_mode' ) === 'edit' ) {
244
-			$_POST["screen_mode"] = 'edit';
244
+			$_POST[ "screen_mode" ] = 'edit';
245 245
 		}
246 246
 
247 247
 	}
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 		$entry_creator_user_id = \GV\Utils::get( $entry, 'created_by' );
317 317
 
318 318
 		$entry_creator_user = GVCommon::get_users( 'change_entry_creator', array( 'include' => $entry_creator_user_id ) );
319
-		$entry_creator_user = isset( $entry_creator_user[0] ) ? $entry_creator_user[0] : array();
319
+		$entry_creator_user = isset( $entry_creator_user[ 0 ] ) ? $entry_creator_user[ 0 ] : array();
320 320
 
321 321
 		$output .= '<option value="0" ' . selected( true, empty( $entry_creator_user_id ), false ) . '> &mdash; ' . esc_attr_x( 'No User', 'No user assigned to the entry', 'gravityview' ) . ' &mdash; </option>';
322 322
 
@@ -335,18 +335,18 @@  discard block
 block discarded – undo
335 335
 		}
336 336
 
337 337
 		$user_count      = count_users();
338
-		$user_count      = $user_count['total_users'];
338
+		$user_count      = $user_count[ 'total_users' ];
339 339
 		$users_displayed = self::DEFAULT_NUMBER_OF_USERS + ( ! empty( $entry_creator_user ) ? 1 : 0 );
340 340
 		if ( $user_count > $users_displayed ) {
341 341
 			$remaining_users = $user_count - $users_displayed;
342
-			$user_users = _n( esc_html__('user', 'gravityview' ), esc_html__('users', 'gravityview' ), $remaining_users );
342
+			$user_users = _n( esc_html__( 'user', 'gravityview' ), esc_html__( 'users', 'gravityview' ), $remaining_users );
343 343
 			$message = esc_html_x( 'Use the input above to search the remaining %d %s.', '%d is replaced with user count %s is replaced with "user" or "users"', 'gravityview' );
344 344
 			$message = sprintf( $message, $remaining_users, $user_users );
345
-			$output  .= '<option value="_user_count" disabled="disabled">' . esc_html( $message ) . '</option>';
345
+			$output .= '<option value="_user_count" disabled="disabled">' . esc_html( $message ) . '</option>';
346 346
 		}
347 347
 
348 348
 		$output .= '</select>';
349
-		$output .= '<input name="originally_created_by" value="' . esc_attr( $entry['created_by'] ) . '" type="hidden" />';
349
+		$output .= '<input name="originally_created_by" value="' . esc_attr( $entry[ 'created_by' ] ) . '" type="hidden" />';
350 350
 		$output .= wp_nonce_field( 'gv_entry_creator', 'gv_entry_creator_nonce', false, false );
351 351
 
352 352
 		echo $output;
@@ -360,8 +360,8 @@  discard block
 block discarded – undo
360 360
 	 * @return array
361 361
 	 */
362 362
 	function register_gform_noconflict( $assets ) {
363
-		$assets[] = 'gravityview_selectwoo';
364
-		$assets[] = 'gravityview_entry_creator';
363
+		$assets[ ] = 'gravityview_selectwoo';
364
+		$assets[ ] = 'gravityview_entry_creator';
365 365
 
366 366
 		return $assets;
367 367
 	}
Please login to merge, or discard this patch.
includes/extensions/edit-entry/partials/form-buttons.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -20,16 +20,16 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 	?>
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -44,35 +44,35 @@  discard block
 block discarded – undo
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
 	$cancel_onclick = 'history.go(' . ( $update_count + 1 ) * -1 . '); return false;';
77 77
 	?>
78 78
 	<a class="btn btn-sm button button-small gv-button-cancel" onclick="<?php echo esc_attr( $cancel_onclick ); ?>" <?php echo $cancel_tabindex; ?> href="<?php echo esc_url( $back_link ); ?>"><?php echo esc_attr( $cancel_label ); ?></a>
@@ -94,5 +94,5 @@  discard block
 block discarded – undo
94 94
 	?>
95 95
 	<input type='hidden' name='update_count' value='<?php echo $update_count + 1; ?>'/>
96 96
 	<input type="hidden" name="action" value="update" />
97
-	<input type="hidden" name="lid" value="<?php echo esc_attr( $object->entry['id'] ); ?>" />
97
+	<input type="hidden" name="lid" value="<?php echo esc_attr( $object->entry[ 'id' ] ); ?>" />
98 98
 </div>
Please login to merge, or discard this patch.