Completed
Push — develop ( e19ce2...317109 )
by Zack
32:08 queued 12:09
created
future/includes/class-gv-template-view-list.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
 		do_action( 'gravityview/template/list/body/before', $context );
152 152
 
153 153
 		/**
154
-		* @action `gravityview_list_body_before` Inside the `tbody`, before any rows are rendered. Can be used to insert additional rows.
155
-		* @deprecated Use `gravityview/template/list/body/before`
156
-		* @since 1.0.7
157
-		* @param \GravityView_View $gravityview_view Current GravityView_View object.
158
-		*/
154
+		 * @action `gravityview_list_body_before` Inside the `tbody`, before any rows are rendered. Can be used to insert additional rows.
155
+		 * @deprecated Use `gravityview/template/list/body/before`
156
+		 * @since 1.0.7
157
+		 * @param \GravityView_View $gravityview_view Current GravityView_View object.
158
+		 */
159 159
 		do_action( 'gravityview_list_body_before', \GravityView_View::getInstance() /** ugh! */ );
160 160
 	}
161 161
 
@@ -177,11 +177,11 @@  discard block
 block discarded – undo
177 177
 		do_action( 'gravityview/template/list/body/after', $context );
178 178
 
179 179
 		/**
180
-		* @action `gravityview_list_body_after` Inside the `tbody`, after any rows are rendered. Can be used to insert additional rows.
181
-		* @deprecated Use `gravityview/template/list/body/after`
182
-		* @since 1.0.7
183
-		* @param \GravityView_View $gravityview_view Current GravityView_View object.
184
-		*/
180
+		 * @action `gravityview_list_body_after` Inside the `tbody`, after any rows are rendered. Can be used to insert additional rows.
181
+		 * @deprecated Use `gravityview/template/list/body/after`
182
+		 * @since 1.0.7
183
+		 * @param \GravityView_View $gravityview_view Current GravityView_View object.
184
+		 */
185 185
 		do_action( 'gravityview_list_body_after', \GravityView_View::getInstance() /** ugh! */ );
186 186
 	}
187 187
 
@@ -212,11 +212,11 @@  discard block
 block discarded – undo
212 212
 		$zone = str_replace( '/', '_', $zone );
213 213
 
214 214
 		/**
215
-		* @action `gravityview_list_entry_$zone_before` Inside the `entry`, before any rows are rendered. Can be used to insert additional rows.
216
-		* @deprecated Use `gravityview/template/list/entry/$zone/before`
217
-		* @since 1.0.7
218
-		* @param \GravityView_View $gravityview_view Current GravityView_View object.
219
-		*/
215
+		 * @action `gravityview_list_entry_$zone_before` Inside the `entry`, before any rows are rendered. Can be used to insert additional rows.
216
+		 * @deprecated Use `gravityview/template/list/entry/$zone/before`
217
+		 * @since 1.0.7
218
+		 * @param \GravityView_View $gravityview_view Current GravityView_View object.
219
+		 */
220 220
 		do_action( sprintf( 'gravityview_list_entry%sbefore', $zone ), $entry->as_entry(), \GravityView_View::getInstance() /** ugh! */ );
221 221
 	}
222 222
 
@@ -247,11 +247,11 @@  discard block
 block discarded – undo
247 247
 		$zone = str_replace( '/', '_', $zone );
248 248
 
249 249
 		/**
250
-		* @action `gravityview_list_entry_$zone_after` Inside the `entry`, after any rows are rendered. Can be used to insert additional rows.
251
-		* @deprecated Use `gravityview/template/list/entry/after`
252
-		* @since 1.0.7
253
-		* @param \GravityView_View $gravityview_view Current GravityView_View object.
254
-		*/
250
+		 * @action `gravityview_list_entry_$zone_after` Inside the `entry`, after any rows are rendered. Can be used to insert additional rows.
251
+		 * @deprecated Use `gravityview/template/list/entry/after`
252
+		 * @since 1.0.7
253
+		 * @param \GravityView_View $gravityview_view Current GravityView_View object.
254
+		 */
255 255
 		do_action( sprintf( 'gravityview_list_entry%safter', $zone ), $entry->as_entry(), \GravityView_View::getInstance() /** ugh! */ );
256 256
 	}
257 257
 }
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-select.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 }
17 17
 
18 18
 if( is_array( $search_field['value'] ) ) {
19
-    gravityview()->log->debug( 'search-field-select.php - Array values passed; using first value.' );
19
+	gravityview()->log->debug( 'search-field-select.php - Array values passed; using first value.' );
20 20
 	$search_field['value'] = reset( $search_field['value'] );
21 21
 }
22 22
 
Please login to merge, or discard this patch.
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/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.
includes/admin/metaboxes/views/view-configuration.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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>
Please login to merge, or discard this patch.
includes/class-gravityview-powered-by.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
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
 		/**
Please login to merge, or discard this patch.
includes/admin/class.field.type.php 1 patch
Indentation   +176 added lines, -176 removed lines patch added patch discarded remove patch
@@ -10,107 +10,107 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.