Completed
Pull Request — master (#729)
by Zack
18:48 queued 14:22
created
includes/class-api.php 1 patch
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -146,20 +146,20 @@  discard block
 block discarded – undo
146 146
 
147 147
 		if( !empty( $field['custom_class'] ) ) {
148 148
 
149
-            $custom_class = $field['custom_class'];
149
+			$custom_class = $field['custom_class'];
150 150
 
151
-            if( !empty( $entry ) ) {
151
+			if( !empty( $entry ) ) {
152 152
 
153
-                // We want the merge tag to be formatted as a class. The merge tag may be
154
-                // replaced by a multiple-word value that should be output as a single class.
155
-                // "Office Manager" will be formatted as `.OfficeManager`, not `.Office` and `.Manager`
156
-                add_filter('gform_merge_tag_filter', 'sanitize_html_class');
153
+				// We want the merge tag to be formatted as a class. The merge tag may be
154
+				// replaced by a multiple-word value that should be output as a single class.
155
+				// "Office Manager" will be formatted as `.OfficeManager`, not `.Office` and `.Manager`
156
+				add_filter('gform_merge_tag_filter', 'sanitize_html_class');
157 157
 
158
-                $custom_class = self::replace_variables( $custom_class, $form, $entry);
158
+				$custom_class = self::replace_variables( $custom_class, $form, $entry);
159 159
 
160
-                // And then we want life to return to normal
161
-                remove_filter('gform_merge_tag_filter', 'sanitize_html_class');
162
-            }
160
+				// And then we want life to return to normal
161
+				remove_filter('gform_merge_tag_filter', 'sanitize_html_class');
162
+			}
163 163
 
164 164
 			// And now we want the spaces to be handled nicely.
165 165
 			$classes[] = gravityview_sanitize_html_class( $custom_class );
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 			'format' => $format,
278 278
 			'entry' => $entry,
279 279
 			'field_type' => $field_type, /** {@since 1.6} */
280
-		    'field_path' => $field_path, /** {@since 1.16} */
280
+			'field_path' => $field_path, /** {@since 1.16} */
281 281
 		));
282 282
 
283 283
 		if( ! empty( $field_path ) ) {
@@ -594,32 +594,32 @@  discard block
 block discarded – undo
594 594
 		return sanitize_title( $slug );
595 595
 	}
596 596
 
597
-    /**
598
-     * If using the entry custom slug feature, make sure the new entries have the custom slug created and saved as meta
599
-     *
600
-     * Triggered by add_action( 'gform_entry_created', array( 'GravityView_API', 'entry_create_custom_slug' ), 10, 2 );
601
-     *
602
-     * @param $entry array Gravity Forms entry object
603
-     * @param $form array Gravity Forms form object
604
-     */
605
-    public static function entry_create_custom_slug( $entry, $form ) {
606
-        /**
607
-         * @filter `gravityview_custom_entry_slug` On entry creation, check if we are using the custom entry slug feature and update the meta
608
-         * @param boolean $custom Should we process the custom entry slug?
609
-         */
610
-        $custom = apply_filters( 'gravityview_custom_entry_slug', false );
611
-        if( $custom ) {
612
-            // create the gravityview_unique_id and save it
597
+	/**
598
+	 * If using the entry custom slug feature, make sure the new entries have the custom slug created and saved as meta
599
+	 *
600
+	 * Triggered by add_action( 'gform_entry_created', array( 'GravityView_API', 'entry_create_custom_slug' ), 10, 2 );
601
+	 *
602
+	 * @param $entry array Gravity Forms entry object
603
+	 * @param $form array Gravity Forms form object
604
+	 */
605
+	public static function entry_create_custom_slug( $entry, $form ) {
606
+		/**
607
+		 * @filter `gravityview_custom_entry_slug` On entry creation, check if we are using the custom entry slug feature and update the meta
608
+		 * @param boolean $custom Should we process the custom entry slug?
609
+		 */
610
+		$custom = apply_filters( 'gravityview_custom_entry_slug', false );
611
+		if( $custom ) {
612
+			// create the gravityview_unique_id and save it
613 613
 
614
-            // Get the entry hash
615
-            $hash = self::get_custom_entry_slug( $entry['id'], $entry );
614
+			// Get the entry hash
615
+			$hash = self::get_custom_entry_slug( $entry['id'], $entry );
616 616
 
617
-	        do_action( 'gravityview_log_debug', __METHOD__ . ' - Setting hash for entry "'.$entry['id'].'": ' . $hash );
617
+			do_action( 'gravityview_log_debug', __METHOD__ . ' - Setting hash for entry "'.$entry['id'].'": ' . $hash );
618 618
 
619
-            gform_update_meta( $entry['id'], 'gravityview_unique_id', $hash, rgar( $entry, 'form_id' ) );
619
+			gform_update_meta( $entry['id'], 'gravityview_unique_id', $hash, rgar( $entry, 'form_id' ) );
620 620
 
621
-        }
622
-    }
621
+		}
622
+	}
623 623
 
624 624
 
625 625
 
@@ -895,7 +895,7 @@  discard block
 block discarded – undo
895 895
 
896 896
 			// If there was an error, continue to the next term.
897 897
 			if ( is_wp_error( $term_link ) ) {
898
-			    continue;
898
+				continue;
899 899
 			}
900 900
 
901 901
 			$output[] = gravityview_get_link( $term_link, esc_html( $term->name ) );
Please login to merge, or discard this patch.