Completed
Pull Request — develop (#1523)
by Zack
19:02
created
includes/extensions/delete-entry/fields/delete_link.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@
 block discarded – undo
12 12
 extract( $gravityview_view->getCurrentField() );
13 13
 
14 14
 // Only show the link to logged-in users with the right caps.
15
-if( !GravityView_Delete_Entry::check_user_cap_delete_entry( $entry, $field_settings ) ) {
15
+if ( ! GravityView_Delete_Entry::check_user_cap_delete_entry( $entry, $field_settings ) ) {
16 16
 	return;
17 17
 }
18 18
 
19
-$link_text = empty( $field_settings['delete_link'] ) ? __('Delete Entry', 'gravityview') : $field_settings['delete_link'];
19
+$link_text = empty( $field_settings[ 'delete_link' ] ) ? __( 'Delete Entry', 'gravityview' ) : $field_settings[ 'delete_link' ];
20 20
 
21 21
 $link_text = apply_filters( 'gravityview_entry_link', GravityView_API::replace_variables( $link_text, $form, $entry ) );
22 22
 
Please login to merge, or discard this patch.
class-gravityview-plugin-hooks-gravityformspartialentries.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
 		$partial_entries_addon = GF_Partial_Entries::get_instance();
55 55
 
56
-		$feed_settings = $partial_entries_addon->get_feed_settings( $form['id'] );
56
+		$feed_settings = $partial_entries_addon->get_feed_settings( $form[ 'id' ] );
57 57
 
58 58
 		$is_enabled = \GV\Utils::get( $feed_settings, 'enable', 0 );
59 59
 
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
 		}
71 71
 
72 72
 		// Set the expected $_POST key for the Add-On to use
73
-		$_POST['partial_entry_id'] = $partial_entry_id;
73
+		$_POST[ 'partial_entry_id' ] = $partial_entry_id;
74 74
 
75 75
 		gravityview()->log->debug( 'Saving partial entry (ID #{partial_entry_id}) for Entry #{entry_id}', array(
76 76
 			'partial_entry_id' => $partial_entry_id,
77 77
 			'entry_id'         => $entry_id
78 78
 		) );
79 79
 
80
-		$partial_entries_addon->maybe_save_partial_entry( $form['id'] );
80
+		$partial_entries_addon->maybe_save_partial_entry( $form[ 'id' ] );
81 81
 	}
82 82
 }
83 83
 
Please login to merge, or discard this patch.
includes/class-gravityview-change-entry-creator.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 			array(
81 81
 				'ajaxurl'  => admin_url( 'admin-ajax.php' ),
82 82
 				'action'   => 'entry_creator_get_users',
83
-				'gf25'    => (bool) gravityview()->plugin->is_GF_25(),
83
+				'gf25'    => (bool)gravityview()->plugin->is_GF_25(),
84 84
 				'language' => array(
85 85
 					'search_placeholder' => esc_html__( 'Search by ID, login, email, or name.', 'gravityview' ),
86 86
 				),
@@ -104,11 +104,11 @@  discard block
 block discarded – undo
104 104
 			)
105 105
 		);
106 106
 
107
-		if ( ! wp_verify_nonce( $post_var['gv_nonce'], 'gv_entry_creator' ) ) {
107
+		if ( ! wp_verify_nonce( $post_var[ 'gv_nonce' ], 'gv_entry_creator' ) ) {
108 108
 			die();
109 109
 		}
110 110
 
111
-		$search_string = $post_var['q'];
111
+		$search_string = $post_var[ 'q' ];
112 112
 
113 113
 		if ( is_numeric( $search_string ) ) {
114 114
 			$user_args = array(
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 		}
156 156
 
157 157
 		// Update the entry. The `false` prevents checking Akismet; `true` disables the user updated hook from firing
158
-		$result = RGFormsModel::update_entry_property( (int) $entry['id'], 'created_by', (int) $user_id, false, true );
158
+		$result = RGFormsModel::update_entry_property( (int)$entry[ 'id' ], 'created_by', (int)$user_id, false, true );
159 159
 
160 160
 		if ( false === $result ) {
161 161
 			$status = __( 'Error', 'gravityview' );
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 			return;
178 178
 		}
179 179
 
180
-		GravityView_Entry_Notes::add_note( $entry['id'], - 1, 'GravityView', $note, 'gravityview' );
180
+		GravityView_Entry_Notes::add_note( $entry[ 'id' ], - 1, 'GravityView', $note, 'gravityview' );
181 181
 
182 182
 	}
183 183
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 		}
213 213
 
214 214
 		// If screen mode isn't set, then we're in the wrong place.
215
-		if ( empty( $_REQUEST['screen_mode'] ) ) {
215
+		if ( empty( $_REQUEST[ 'screen_mode' ] ) ) {
216 216
 			return;
217 217
 		}
218 218
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 
239 239
 		// If $_GET['screen_mode'] is set to edit, set $_POST value
240 240
 		if ( \GV\Utils::_GET( 'screen_mode' ) === 'edit' ) {
241
-			$_POST["screen_mode"] = 'edit';
241
+			$_POST[ "screen_mode" ] = 'edit';
242 242
 		}
243 243
 
244 244
 	}
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 		$entry_creator_user_id = \GV\Utils::get( $entry, 'created_by' );
314 314
 
315 315
 		$entry_creator_user = GVCommon::get_users( 'change_entry_creator', array( 'include' => $entry_creator_user_id ) );
316
-		$entry_creator_user = isset( $entry_creator_user[0] ) ? $entry_creator_user[0] : array();
316
+		$entry_creator_user = isset( $entry_creator_user[ 0 ] ) ? $entry_creator_user[ 0 ] : array();
317 317
 
318 318
 		if ( empty( $entry_creator_user ) ) {
319 319
 			$output .= '<option value="0"> &mdash; ' . esc_attr_x( 'No User', 'No user assigned to the entry', 'gravityview' ) . ' &mdash; </option>';
@@ -331,18 +331,18 @@  discard block
 block discarded – undo
331 331
 		}
332 332
 
333 333
 		$user_count      = count_users();
334
-		$user_count      = $user_count['total_users'];
334
+		$user_count      = $user_count[ 'total_users' ];
335 335
 		$users_displayed = self::DEFAULT_NUMBER_OF_USERS + ( ! empty( $entry_creator_user ) ? 1 : 0 );
336 336
 		if ( $user_count > $users_displayed ) {
337 337
 			$remaining_users = $user_count - $users_displayed;
338
-			$user_users = _n( esc_html__('user', 'gravityview' ), esc_html__('users', 'gravityview' ), $remaining_users );
338
+			$user_users = _n( esc_html__( 'user', 'gravityview' ), esc_html__( 'users', 'gravityview' ), $remaining_users );
339 339
 			$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' );
340 340
 			$message = sprintf( $message, $remaining_users, $user_users );
341
-			$output  .= '<option value="_user_count" disabled="disabled">' . esc_html( $message ) . '</option>';
341
+			$output .= '<option value="_user_count" disabled="disabled">' . esc_html( $message ) . '</option>';
342 342
 		}
343 343
 
344 344
 		$output .= '</select>';
345
-		$output .= '<input name="originally_created_by" value="' . esc_attr( $entry['created_by'] ) . '" type="hidden" />';
345
+		$output .= '<input name="originally_created_by" value="' . esc_attr( $entry[ 'created_by' ] ) . '" type="hidden" />';
346 346
 		$output .= wp_nonce_field( 'gv_entry_creator', 'gv_entry_creator_nonce', false, false );
347 347
 
348 348
 		echo $output;
Please login to merge, or discard this patch.