Completed
Push — develop ( 32f12c...df82b0 )
by Zack
53:29 queued 33:28
created
future/includes/class-gv-template-view-table.php 1 patch
Indentation   +88 added lines, -88 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 
20 20
 
21 21
 	/**
22
-     * Constructor. Add filters to modify output.
23
-     *
22
+	 * Constructor. Add filters to modify output.
23
+	 *
24 24
 	 * @since 2.0.4
25 25
 	 *
26 26
 	 * @param View $view
@@ -29,19 +29,19 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	public function __construct( View $view, Entry_Collection $entries, Request $request ) {
31 31
 
32
-	    add_filter( 'gravityview/template/field/label', array( __CLASS__, 'add_columns_sort_links' ), 100, 2 );
32
+		add_filter( 'gravityview/template/field/label', array( __CLASS__, 'add_columns_sort_links' ), 100, 2 );
33 33
 
34 34
 		parent::__construct( $view, $entries, $request );
35 35
 	}
36 36
 
37 37
 	/**
38
-     * Add sorting links to HTML columns that support sorting
39
-     *
40
-     * @since 2.0.4
41
-     * @since 2.0.5 Made static
42
-     *
43
-     * @static
44
-     *
38
+	 * Add sorting links to HTML columns that support sorting
39
+	 *
40
+	 * @since 2.0.4
41
+	 * @since 2.0.5 Made static
42
+	 *
43
+	 * @static
44
+	 *
45 45
 	 * @param string $column_label Label for the table column
46 46
 	 * @param \GV\Template_Context $context
47 47
 	 *
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		$sort_columns = $context->view->settings->get( 'sort_columns' );
53 53
 
54 54
 		if ( empty( $sort_columns ) ) {
55
-            return $column_label;
55
+			return $column_label;
56 56
 		}
57 57
 
58 58
 		if ( ! \GravityView_frontend::getInstance()->is_field_sortable( $context->field->ID, $context->view->form->form ) ) {
@@ -102,22 +102,22 @@  discard block
 block discarded – undo
102 102
 		// If we are already sorting by the current field...
103 103
 		if ( ! empty( $sorting['key'] ) && (string) $sort_field_id === (string) $sorting['key'] ) {
104 104
 
105
-		    switch( $sorting['direction'] ) {
106
-		        // No sort
107
-                case '':
108
-	                $sort_args[1] = 'asc';
109
-	                $class .= ' gv-icon-caret-up-down';
110
-                    break;
111
-                case 'desc':
112
-	                $sort_args[1] = '';
113
-	                $class .= ' gv-icon-sort-asc';
114
-	                break;
115
-                case 'asc':
116
-                default:
117
-                    $sort_args[1] = 'desc';
118
-                    $class .= ' gv-icon-sort-desc';
119
-                    break;
120
-            }
105
+			switch( $sorting['direction'] ) {
106
+				// No sort
107
+				case '':
108
+					$sort_args[1] = 'asc';
109
+					$class .= ' gv-icon-caret-up-down';
110
+					break;
111
+				case 'desc':
112
+					$sort_args[1] = '';
113
+					$class .= ' gv-icon-sort-asc';
114
+					break;
115
+				case 'asc':
116
+				default:
117
+					$sort_args[1] = 'desc';
118
+					$class .= ' gv-icon-sort-desc';
119
+					break;
120
+			}
121 121
 
122 122
 		} else {
123 123
 			$class .= ' gv-icon-caret-up-down';
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 		$url = remove_query_arg( 'sort', $url );
128 128
 		$multisort_url = self::_get_multisort_url( $url, $sort_args, $context->field->ID );
129 129
 
130
-    	$url = add_query_arg( $sort_args[0], $sort_args[1], $url );
130
+		$url = add_query_arg( $sort_args[0], $sort_args[1], $url );
131 131
 
132 132
 		$return = '<a href="'. esc_url_raw( $url ) .'"';
133 133
 
@@ -141,50 +141,50 @@  discard block
 block discarded – undo
141 141
 	}
142 142
 
143 143
 	/**
144
-     * Get the multi-sort URL used in the sorting links
145
-     *
146
-     * @todo Consider moving to Utils?
147
-     *
148
-     * @since 2.3
149
-     *
150
-     * @see add_columns_sort_links
144
+	 * Get the multi-sort URL used in the sorting links
145
+	 *
146
+	 * @todo Consider moving to Utils?
147
+	 *
148
+	 * @since 2.3
149
+	 *
150
+	 * @see add_columns_sort_links
151 151
 	 * @param string $url Single-sort URL
152 152
 	 * @param array $sort_args Single sorting for rules, in [ field_id, dir ] format
153
-     * @param string|int $field_id ID of the current field being displayed
154
-     *
155
-     * @return string Multisort URL, if there are multiple sorts. Otherwise, existing $url
153
+	 * @param string|int $field_id ID of the current field being displayed
154
+	 *
155
+	 * @return string Multisort URL, if there are multiple sorts. Otherwise, existing $url
156 156
 	 */
157 157
 	static public function _get_multisort_url( $url, $sort_args, $field_id ) {
158 158
 
159 159
 		$sorts = Utils::_GET( 'sort' );
160 160
 
161 161
 		if ( ! is_array( $sorts ) ) {
162
-            return $url;
162
+			return $url;
163 163
 		}
164 164
 
165
-        $multisort_url = $url;
165
+		$multisort_url = $url;
166 166
 
167 167
 		// If the field has already been sorted by, add the field to the URL
168
-        if ( ! in_array( $field_id, $keys = array_keys( $sorts ) ) ) {
169
-            if ( count( $keys ) ) {
170
-                $multisort_url = add_query_arg( sprintf( 'sort[%s]', end( $keys ) ), $sorts[ end( $keys ) ], $multisort_url );
171
-                $multisort_url = add_query_arg( $sort_args[0], $sort_args[1], $multisort_url );
172
-            } else {
173
-                $multisort_url = add_query_arg( $sort_args[0], $sort_args[1], $multisort_url );
174
-            }
175
-        }
176
-        // Otherwise, we are just updating the sort order
177
-        else {
178
-
179
-            // Pass empty value to unset
180
-            if( '' === $sort_args[1] ) {
181
-	            unset( $sorts[ $field_id ] );
182
-            } else {
183
-	            $sorts[ $field_id ] = $sort_args[1];
184
-            }
185
-
186
-            $multisort_url = add_query_arg( array( 'sort' => $sorts ), $multisort_url );
187
-        }
168
+		if ( ! in_array( $field_id, $keys = array_keys( $sorts ) ) ) {
169
+			if ( count( $keys ) ) {
170
+				$multisort_url = add_query_arg( sprintf( 'sort[%s]', end( $keys ) ), $sorts[ end( $keys ) ], $multisort_url );
171
+				$multisort_url = add_query_arg( $sort_args[0], $sort_args[1], $multisort_url );
172
+			} else {
173
+				$multisort_url = add_query_arg( $sort_args[0], $sort_args[1], $multisort_url );
174
+			}
175
+		}
176
+		// Otherwise, we are just updating the sort order
177
+		else {
178
+
179
+			// Pass empty value to unset
180
+			if( '' === $sort_args[1] ) {
181
+				unset( $sorts[ $field_id ] );
182
+			} else {
183
+				$sorts[ $field_id ] = $sort_args[1];
184
+			}
185
+
186
+			$multisort_url = add_query_arg( array( 'sort' => $sorts ), $multisort_url );
187
+		}
188 188
 
189 189
 		return $multisort_url;
190 190
 	}
@@ -214,10 +214,10 @@  discard block
 block discarded – undo
214 214
 	}
215 215
 
216 216
 	/**
217
-     * Returns the label for a column, with support for all deprecated filters
218
-     *
219
-     * @since 2.1
220
-     *
217
+	 * Returns the label for a column, with support for all deprecated filters
218
+	 *
219
+	 * @since 2.1
220
+	 *
221 221
 	 * @param \GV\Field $field
222 222
 	 * @param \GV\Template_Context $context
223 223
 	 */
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 		$column_label = apply_filters( 'gravityview/template/field/label', $column_label, $context );
241 241
 
242 242
 		return $column_label;
243
-    }
243
+	}
244 244
 
245 245
 	/**
246 246
 	 * Output the entry row.
@@ -309,15 +309,15 @@  discard block
 block discarded – undo
309 309
 				 */
310 310
 				do_action( 'gravityview/template/table/cells/before', $context );
311 311
 
312
-                /**
313
-                 * @action `gravityview_table_cells_before` Inside the `tr` while rendering each entry in the loop. Can be used to insert additional table cells.
314
-                 * @since 1.0.7
312
+				/**
313
+				 * @action `gravityview_table_cells_before` Inside the `tr` while rendering each entry in the loop. Can be used to insert additional table cells.
314
+				 * @since 1.0.7
315 315
 				 * @param \GravityView_View $this Current GravityView_View object
316 316
 				 * @deprecated Use `gravityview/template/table/cells/before`
317
-                 */
318
-                do_action( 'gravityview_table_cells_before', \GravityView_View::getInstance() );
317
+				 */
318
+				do_action( 'gravityview_table_cells_before', \GravityView_View::getInstance() );
319 319
 
320
-                foreach ( $fields->all() as $field ) {
320
+				foreach ( $fields->all() as $field ) {
321 321
 					if ( isset( $this->view->unions[ $entry['form_id'] ] ) ) {
322 322
 						if ( isset( $this->view->unions[ $entry['form_id'] ][ $field->ID ] ) ) {
323 323
 							$field = $this->view->unions[ $entry['form_id'] ][ $field->ID ];
@@ -337,13 +337,13 @@  discard block
 block discarded – undo
337 337
 				 */
338 338
 				do_action( 'gravityview/template/table/cells/after', $context );
339 339
 
340
-                /**
341
-                 * @action `gravityview_table_cells_after` Inside the `tr` while rendering each entry in the loop. Can be used to insert additional table cells.
342
-                 * @since 1.0.7
340
+				/**
341
+				 * @action `gravityview_table_cells_after` Inside the `tr` while rendering each entry in the loop. Can be used to insert additional table cells.
342
+				 * @since 1.0.7
343 343
 				 * @param \GravityView_View $this Current GravityView_View object
344 344
 				 * @deprecated Use `gravityview/template/table/cells/after`
345
-                 */
346
-                do_action( 'gravityview_table_cells_after', \GravityView_View::getInstance() );
345
+				 */
346
+				do_action( 'gravityview_table_cells_after', \GravityView_View::getInstance() );
347 347
 
348 348
 				?>
349 349
 			</tr>
@@ -384,9 +384,9 @@  discard block
 block discarded – undo
384 384
 			'value' => $value,
385 385
 			'hide_empty' => false,
386 386
 			'zone_id' => 'directory_table-columns',
387
-            'label' => self::get_field_column_label( $field, $context ),
387
+			'label' => self::get_field_column_label( $field, $context ),
388 388
 			'markup' => '<td id="{{ field_id }}" class="{{ class }}" data-label="{{label_value:data-label}}">{{ value }}</td>',
389
-            'form' => $form,
389
+			'form' => $form,
390 390
 		);
391 391
 
392 392
 		/** Output. */
@@ -411,11 +411,11 @@  discard block
 block discarded – undo
411 411
 		do_action( 'gravityview/template/table/body/before', $context );
412 412
 
413 413
 		/**
414
-		* @action `gravityview_table_body_before` Inside the `tbody`, before any rows are rendered. Can be used to insert additional rows.
415
-		* @deprecated Use `gravityview/template/table/body/before`
416
-		* @since 1.0.7
417
-		* @param \GravityView_View $gravityview_view Current GravityView_View object.
418
-		*/
414
+		 * @action `gravityview_table_body_before` Inside the `tbody`, before any rows are rendered. Can be used to insert additional rows.
415
+		 * @deprecated Use `gravityview/template/table/body/before`
416
+		 * @since 1.0.7
417
+		 * @param \GravityView_View $gravityview_view Current GravityView_View object.
418
+		 */
419 419
 		do_action( 'gravityview_table_body_before', \GravityView_View::getInstance() /** ugh! */ );
420 420
 	}
421 421
 
@@ -437,11 +437,11 @@  discard block
 block discarded – undo
437 437
 		do_action( 'gravityview/template/table/body/after', $context );
438 438
 
439 439
 		/**
440
-		* @action `gravityview_table_body_after` Inside the `tbody`, after any rows are rendered. Can be used to insert additional rows.
441
-		* @deprecated Use `gravityview/template/table/body/after`
442
-		* @since 1.0.7
443
-		* @param \GravityView_View $gravityview_view Current GravityView_View object.
444
-		*/
440
+		 * @action `gravityview_table_body_after` Inside the `tbody`, after any rows are rendered. Can be used to insert additional rows.
441
+		 * @deprecated Use `gravityview/template/table/body/after`
442
+		 * @since 1.0.7
443
+		 * @param \GravityView_View $gravityview_view Current GravityView_View object.
444
+		 */
445 445
 		do_action( 'gravityview_table_body_after', \GravityView_View::getInstance() /** ugh! */ );
446 446
 	}
447 447
 
Please login to merge, or discard this patch.
future/includes/class-gv-request.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -170,10 +170,10 @@
 block discarded – undo
170 170
 	 */
171 171
 	public function is_edit_entry( $form_id = 0 ) {
172 172
 		/**
173
-		* @filter `gravityview_is_edit_entry` Whether we're currently on the Edit Entry screen \n
174
-		* The Edit Entry functionality overrides this value.
175
-		* @param boolean $is_edit_entry
176
-		*/
173
+		 * @filter `gravityview_is_edit_entry` Whether we're currently on the Edit Entry screen \n
174
+		 * The Edit Entry functionality overrides this value.
175
+		 * @param boolean $is_edit_entry
176
+		 */
177 177
 		if ( ( $entry = $this->is_entry( $form_id ) ) && apply_filters( 'gravityview_is_edit_entry', false ) ) {
178 178
 			if ( $entry->is_multi() ) {
179 179
 				return array_pop( $entry->entries );
Please login to merge, or discard this patch.
includes/class-admin-approve-entries.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -361,14 +361,14 @@  discard block
 block discarded – undo
361 361
 	/**
362 362
 	 * update_approved function.
363 363
 	 *
364
-     * @since 1.18 Moved to GravityView_Entry_Approval::update_approved
364
+	 * @since 1.18 Moved to GravityView_Entry_Approval::update_approved
365 365
 	 * @see GravityView_Entry_Approval::update_approved
366
-     *
366
+	 *
367 367
 	 * @param int $entry_id (default: 0)
368 368
 	 * @param int $approved (default: 0)
369 369
 	 * @param int $form_id (default: 0)
370 370
 	 * @param int $approvedcolumn (default: 0)
371
-     *
371
+	 *
372 372
 	 * @return boolean True: It worked; False: it failed
373 373
 	 */
374 374
 	public static function update_approved( $entry_id = 0, $approved = 0, $form_id = 0, $approvedcolumn = 0) {
@@ -378,9 +378,9 @@  discard block
 block discarded – undo
378 378
 	/**
379 379
 	 * Calculate the approve field.input id
380 380
 	 *
381
-     * @since 1.18 Moved to GravityView_Entry_Approval::get_approved_column
382
-     * @see GravityView_Entry_Approval::get_approved_column
383
-     *
381
+	 * @since 1.18 Moved to GravityView_Entry_Approval::get_approved_column
382
+	 * @see GravityView_Entry_Approval::get_approved_column
383
+	 *
384 384
 	 * @param mixed $form GF Form or Form ID
385 385
 	 * @return false|null|string Returns the input ID of the approved field. Returns NULL if no approved fields were found. Returns false if $form_id wasn't set.
386 386
 	 */
@@ -505,37 +505,37 @@  discard block
 block discarded – undo
505 505
 			'bulk_actions' => $this->get_bulk_actions( $form_id ),
506 506
 			'bulk_message' => $this->bulk_update_message,
507 507
 			'unapprove_title' => GravityView_Entry_Approval_Status::get_title_attr('unapproved'),
508
-            'approve_title' => GravityView_Entry_Approval_Status::get_title_attr('disapproved'),
508
+			'approve_title' => GravityView_Entry_Approval_Status::get_title_attr('disapproved'),
509 509
 			'disapprove_title' => GravityView_Entry_Approval_Status::get_title_attr('approved'),
510 510
 			'column_title' => __( 'Show entry in directory view?', 'gravityview'),
511 511
 			'column_link' => esc_url( $this->get_sort_link() ),
512
-            'status_popover_template' => GravityView_Entry_Approval::get_popover_template(),
512
+			'status_popover_template' => GravityView_Entry_Approval::get_popover_template(),
513 513
 			'status_popover_placement' => GravityView_Entry_Approval::get_popover_placement(),
514 514
 		) );
515 515
 
516 516
 	}
517 517
 
518 518
 	/**
519
-     * Generate a link to sort by approval status
520
-     *
521
-     * Note: Sorting by approval will never be great because it's not possible currently to declare the sorting as
522
-     * numeric, but it does group the approved entries together.
523
-     *
524
-     * @since 2.0.14 Remove need for approval field for sorting by approval status
525
-     *
519
+	 * Generate a link to sort by approval status
520
+	 *
521
+	 * Note: Sorting by approval will never be great because it's not possible currently to declare the sorting as
522
+	 * numeric, but it does group the approved entries together.
523
+	 *
524
+	 * @since 2.0.14 Remove need for approval field for sorting by approval status
525
+	 *
526 526
 	 * @param int $form_id [NO LONGER USED]
527 527
 	 *
528 528
 	 * @return string Sorting link
529 529
 	 */
530 530
 	private function get_sort_link( $form_id = 0 ) {
531 531
 
532
-	    $args = array(
533
-		    'orderby' => 'is_approved',
534
-            'order' => ( 'desc' === \GV\Utils::_GET( 'order' ) ) ? 'asc' : 'desc',
535
-        );
532
+		$args = array(
533
+			'orderby' => 'is_approved',
534
+			'order' => ( 'desc' === \GV\Utils::_GET( 'order' ) ) ? 'asc' : 'desc',
535
+		);
536 536
 
537 537
 		return add_query_arg( $args );
538
-    }
538
+	}
539 539
 
540 540
 	/**
541 541
 	 * Get an array of options to be added to the Gravity Forms "Bulk action" dropdown in a "GravityView" option group
@@ -577,9 +577,9 @@  discard block
 block discarded – undo
577 577
 		// Sanitize the values, just to be sure.
578 578
 		foreach ( $bulk_actions as $key => $group ) {
579 579
 
580
-		    if( empty( $group ) ) {
581
-		        continue;
582
-		    }
580
+			if( empty( $group ) ) {
581
+				continue;
582
+			}
583 583
 
584 584
 			foreach ( $group as $i => $action ) {
585 585
 				$bulk_actions[ $key ][ $i ]['label'] = esc_html( $bulk_actions[ $key ][ $i ]['label'] );
Please login to merge, or discard this patch.
includes/class-ajax.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
 		// template areas
140 140
 		$template_areas_directory = apply_filters( 'gravityview_template_active_areas', array(), $template_id, 'directory' );
141
-        $template_areas_single = apply_filters( 'gravityview_template_active_areas', array(), $template_id, 'single' );
141
+		$template_areas_single = apply_filters( 'gravityview_template_active_areas', array(), $template_id, 'single' );
142 142
 
143 143
 		// widget areas
144 144
 		$default_widget_areas = \GV\Widget::get_default_widget_areas();
@@ -331,40 +331,40 @@  discard block
 block discarded – undo
331 331
 		// load file
332 332
 		$xmlstr = file_get_contents( $form_file );
333 333
 
334
-        $options = array(
335
-            "page" => array("unserialize_as_array" => true),
336
-            "form"=> array("unserialize_as_array" => true),
337
-            "field"=> array("unserialize_as_array" => true),
338
-            "rule"=> array("unserialize_as_array" => true),
339
-            "choice"=> array("unserialize_as_array" => true),
340
-            "input"=> array("unserialize_as_array" => true),
341
-            "routing_item"=> array("unserialize_as_array" => true),
342
-            "creditCard"=> array("unserialize_as_array" => true),
343
-            "routin"=> array("unserialize_as_array" => true),
344
-            "confirmation" => array("unserialize_as_array" => true),
345
-            "notification" => array("unserialize_as_array" => true)
346
-        );
334
+		$options = array(
335
+			"page" => array("unserialize_as_array" => true),
336
+			"form"=> array("unserialize_as_array" => true),
337
+			"field"=> array("unserialize_as_array" => true),
338
+			"rule"=> array("unserialize_as_array" => true),
339
+			"choice"=> array("unserialize_as_array" => true),
340
+			"input"=> array("unserialize_as_array" => true),
341
+			"routing_item"=> array("unserialize_as_array" => true),
342
+			"creditCard"=> array("unserialize_as_array" => true),
343
+			"routin"=> array("unserialize_as_array" => true),
344
+			"confirmation" => array("unserialize_as_array" => true),
345
+			"notification" => array("unserialize_as_array" => true)
346
+		);
347 347
 
348 348
 		$xml = new RGXML($options);
349
-        $forms = $xml->unserialize($xmlstr);
349
+		$forms = $xml->unserialize($xmlstr);
350 350
 
351
-        if( !$forms ) {
352
-        	gravityview()->log->error( 'Importing Form Fields for preset [{template_id}]. Error importing file. (File) {path}', array( 'template_id' => $template_id, 'path' => $form_file ) );
353
-        	return false;
354
-        }
351
+		if( !$forms ) {
352
+			gravityview()->log->error( 'Importing Form Fields for preset [{template_id}]. Error importing file. (File) {path}', array( 'template_id' => $template_id, 'path' => $form_file ) );
353
+			return false;
354
+		}
355 355
 
356
-        if( !empty( $forms[0] ) && is_array( $forms[0] ) ) {
357
-        	$form = $forms[0];
358
-        }
356
+		if( !empty( $forms[0] ) && is_array( $forms[0] ) ) {
357
+			$form = $forms[0];
358
+		}
359 359
 
360
-        if( empty( $form ) ) {
361
-        	gravityview()->log->error( '$form not set.', array( 'data' => $forms ) );
362
-        	return false;
363
-        }
360
+		if( empty( $form ) ) {
361
+			gravityview()->log->error( '$form not set.', array( 'data' => $forms ) );
362
+			return false;
363
+		}
364 364
 
365
-        gravityview()->log->debug( '[pre_get_available_fields] Importing Form Fields for preset [{template_id}]. (Form)', array( 'template_id' => $template_id, 'data' => $form ) );
365
+		gravityview()->log->debug( '[pre_get_available_fields] Importing Form Fields for preset [{template_id}]. (Form)', array( 'template_id' => $template_id, 'data' => $form ) );
366 366
 
367
-        return $form;
367
+		return $form;
368 368
 
369 369
 	}
370 370
 
Please login to merge, or discard this patch.
future/includes/class-gv-extension.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -305,13 +305,13 @@
 block discarded – undo
305 305
 			$this->_remote_update_url,
306 306
 			$this->_path,
307 307
 			array(
308
-            	'version'	=> $this->_version, // current version number
309
-            	'license'	=> \GV\Utils::get( $license, 'license_key', \GV\Utils::get( $license, 'license', null ) ),
310
-	            'item_id'   => $this->_item_id, // The ID of the download on _remote_update_url
311
-            	'item_name' => $this->_title,  // name of this plugin
312
-            	'author' 	=> strip_tags( $this->_author )  // author of this plugin
313
-          	)
314
-        );
308
+				'version'	=> $this->_version, // current version number
309
+				'license'	=> \GV\Utils::get( $license, 'license_key', \GV\Utils::get( $license, 'license', null ) ),
310
+				'item_id'   => $this->_item_id, // The ID of the download on _remote_update_url
311
+				'item_name' => $this->_title,  // name of this plugin
312
+				'author' 	=> strip_tags( $this->_author )  // author of this plugin
313
+		  	)
314
+		);
315 315
 	}
316 316
 
317 317
 	/**
Please login to merge, or discard this patch.
includes/class-admin.php 1 patch
Indentation   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	 * @return void
93 93
 	 */
94 94
 	public static function connected_form_warning( $form_id = 0 ) {
95
-        global $pagenow;
95
+		global $pagenow;
96 96
 
97 97
 		if ( empty( $form_id ) || $pagenow === 'post-new.php' ) {
98 98
 			return;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 			<?php
120 120
 		}
121 121
 
122
-        remove_action( 'gravityview/metaboxes/data-source/before', array( 'GravityView_Admin', 'connected_form_warning' ) );
122
+		remove_action( 'gravityview/metaboxes/data-source/before', array( 'GravityView_Admin', 'connected_form_warning' ) );
123 123
 	}
124 124
 
125 125
 	/**
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 			7  => sprintf(__( 'View saved. %sView on website.%s', 'gravityview' ), '<a href="'.get_permalink( $post_id ).'">', '</a>') . $new_form_text,
242 242
 			8  => __( 'View submitted.', 'gravityview' ),
243 243
 			9  => sprintf(
244
-		        /* translators: Date and time the View is scheduled to be published */
244
+				/* translators: Date and time the View is scheduled to be published */
245 245
 				__( 'View scheduled for: %1$s.', 'gravityview' ),
246 246
 				// translators: Publish box date format, see http://php.net/date
247 247
 				date_i18n( __( 'M j, Y @ G:i', 'gravityview' ), strtotime( ( isset( $post->post_date ) ? $post->post_date : NULL )  ) )
@@ -298,7 +298,6 @@  discard block
 block discarded – undo
298 298
 	 *
299 299
 	 * @deprecated since 1.12
300 300
 	 * @see GravityView_Compatibility::get_plugin_status()
301
-
302 301
 	 * @return boolean|string True: plugin is active; False: plugin file doesn't exist at path; 'inactive' it's inactive
303 302
 	 */
304 303
 	static function get_plugin_status( $location = '' ) {
Please login to merge, or discard this patch.
includes/class-common.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -310,12 +310,12 @@  discard block
 block discarded – undo
310 310
 						}
311 311
 
312 312
 						/**
313
-                         * @hack
314
-                         * In case of email/email confirmation, the input for email has the same id as the parent field
315
-                         */
313
+						 * @hack
314
+						 * In case of email/email confirmation, the input for email has the same id as the parent field
315
+						 */
316 316
 						if( 'email' === $field['type'] && false === strpos( $input['id'], '.' ) ) {
317
-                            continue;
318
-                        }
317
+							continue;
318
+						}
319 319
 						$fields["{$input['id']}"] = array(
320 320
 							'label' => \GV\Utils::get( $input, 'label' ),
321 321
 							'customLabel' => \GV\Utils::get( $input, 'customLabel' ),
@@ -1488,7 +1488,7 @@  discard block
 block discarded – undo
1488 1488
 			),
1489 1489
 		);
1490 1490
 
1491
-        $fields = $date_created + $fields;
1491
+		$fields = $date_created + $fields;
1492 1492
 
1493 1493
 		$blacklist_field_types = apply_filters( 'gravityview_blacklist_field_types', $blacklist, NULL );
1494 1494
 
@@ -1516,13 +1516,13 @@  discard block
 block discarded – undo
1516 1516
 
1517 1517
 		}
1518 1518
 
1519
-        /**
1520
-         * @filter `gravityview/common/sortable_fields` Filter the sortable fields
1521
-         * @since 1.12
1522
-         * @param array $fields Sub-set of GF form fields that are sortable
1523
-         * @param int $formid The Gravity Forms form ID that the fields are from
1524
-         */
1525
-        $fields = apply_filters( 'gravityview/common/sortable_fields', $fields, $formid );
1519
+		/**
1520
+		 * @filter `gravityview/common/sortable_fields` Filter the sortable fields
1521
+		 * @since 1.12
1522
+		 * @param array $fields Sub-set of GF form fields that are sortable
1523
+		 * @param int $formid The Gravity Forms form ID that the fields are from
1524
+		 */
1525
+		$fields = apply_filters( 'gravityview/common/sortable_fields', $fields, $formid );
1526 1526
 
1527 1527
 		return $fields;
1528 1528
 	}
@@ -1814,26 +1814,26 @@  discard block
 block discarded – undo
1814 1814
 	}
1815 1815
 
1816 1816
 
1817
-    /**
1818
-     * Display updated/error notice
1819
-     *
1820
-     * @since 1.19.2 Added $cap and $object_id parameters
1821
-     *
1822
-     * @param string $notice text/HTML of notice
1823
-     * @param string $class CSS class for notice (`updated` or `error`)
1824
-     * @param string $cap [Optional] Define a capability required to show a notice. If not set, displays to all caps.
1825
-     *
1826
-     * @return string
1827
-     */
1828
-    public static function generate_notice( $notice, $class = '', $cap = '', $object_id = null ) {
1829
-
1830
-    	// If $cap is defined, only show notice if user has capability
1831
-    	if( $cap && ! GVCommon::has_cap( $cap, $object_id ) ) {
1832
-    		return '';
1833
-	    }
1834
-
1835
-        return '<div class="gv-notice '.gravityview_sanitize_html_class( $class ) .'">'. $notice .'</div>';
1836
-    }
1817
+	/**
1818
+	 * Display updated/error notice
1819
+	 *
1820
+	 * @since 1.19.2 Added $cap and $object_id parameters
1821
+	 *
1822
+	 * @param string $notice text/HTML of notice
1823
+	 * @param string $class CSS class for notice (`updated` or `error`)
1824
+	 * @param string $cap [Optional] Define a capability required to show a notice. If not set, displays to all caps.
1825
+	 *
1826
+	 * @return string
1827
+	 */
1828
+	public static function generate_notice( $notice, $class = '', $cap = '', $object_id = null ) {
1829
+
1830
+		// If $cap is defined, only show notice if user has capability
1831
+		if( $cap && ! GVCommon::has_cap( $cap, $object_id ) ) {
1832
+			return '';
1833
+		}
1834
+
1835
+		return '<div class="gv-notice '.gravityview_sanitize_html_class( $class ) .'">'. $notice .'</div>';
1836
+	}
1837 1837
 
1838 1838
 	/**
1839 1839
 	 * Inspired on \GFCommon::encode_shortcodes, reverse the encoding by replacing the ascii characters by the shortcode brackets
Please login to merge, or discard this patch.
includes/widgets/class-gravityview-widget-page-size.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
 	/**
78 78
 	 * Render the page size widget
79
-     *
79
+	 *
80 80
 	 * @param array $widget_args The Widget shortcode args.
81 81
 	 * @param string $content The content.
82 82
 	 * @param string|\GV\Template_Context $context The context, if available.
@@ -117,10 +117,10 @@  discard block
 block discarded – undo
117 117
 						<?php } ?>
118 118
                     </select>
119 119
                     <input type="submit" value="Submit" style="visibility: hidden; position: absolute;" /><?php
120
-                    if( ! empty( $_GET ) ) {
121
-                        $get = $_GET;
122
-                        unset( $get['page_size'] );
123
-	                    foreach ( $get as $key => $value ) {
120
+					if( ! empty( $_GET ) ) {
121
+						$get = $_GET;
122
+						unset( $get['page_size'] );
123
+						foreach ( $get as $key => $value ) {
124 124
 							if ( is_array( $value ) ) {
125 125
 								foreach ( $value as $_key => $_value ) {
126 126
 									printf( '<input type="hidden" name="%s[%s]" value="%s" />', esc_attr( $key ), esc_attr( $_key ), esc_attr( $_value ) );
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
 							} else {
129 129
 								printf( '<input type="hidden" name="%s" value="%s" />', esc_attr( $key ), esc_attr( $value ) );
130 130
 							}
131
-	                    }
132
-                    }
133
-                    ?>
131
+						}
132
+					}
133
+					?>
134 134
                 </div>
135 135
             </form>
136 136
         </div>
Please login to merge, or discard this patch.
includes/extensions/duplicate-entry/class-duplicate-entry.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 ) );
Please login to merge, or discard this patch.