Completed
Pull Request — develop (#1141)
by
unknown
16:07
created
includes/admin/class-gravityview-admin-view-item.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	protected $form_id;
46 46
 
47
-	function __construct( $title = '', $item_id, $item = array(), $settings = array(), $form_id = null) {
47
+	function __construct( $title = '', $item_id, $item = array(), $settings = array(), $form_id = null ) {
48 48
 
49 49
 		// Backward compat
50
-		if ( ! empty( $item['type'] ) ) {
51
-			$item['input_type'] = $item['type'];
52
-			unset( $item['type'] );
50
+		if ( ! empty( $item[ 'type' ] ) ) {
51
+			$item[ 'input_type' ] = $item[ 'type' ];
52
+			unset( $item[ 'type' ] );
53 53
 		}
54 54
 
55 55
 		// Prevent items from not having index set
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		$this->id         = $item_id;
72 72
 		$this->form_id    = $form_id;
73 73
 		$this->settings   = $settings;
74
-		$this->label_type = $item['label_type'];
74
+		$this->label_type = $item[ 'label_type' ];
75 75
 	}
76 76
 
77 77
 	/**
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
 		if ( $html ) {
115 115
 
116 116
 			foreach ( $field_info_items as $item ) {
117
-				$class = isset( $item['class'] ) ? sanitize_html_class( $item['class'] ) . ' description' : 'description';
117
+				$class = isset( $item[ 'class' ] ) ? sanitize_html_class( $item[ 'class' ] ) . ' description' : 'description';
118 118
 				// Add the title in case the value's long, in which case, it'll be truncated by CSS.
119 119
 				$output .= '<span class="' . $class . '">';
120
-				$output .= esc_html( $item['value'] );
120
+				$output .= esc_html( $item[ 'value' ] );
121 121
 				$output .= '</span>';
122 122
 			}
123 123
 
@@ -145,29 +145,29 @@  discard block
 block discarded – undo
145 145
 
146 146
 		// $settings_html will just be hidden inputs if empty. Otherwise, it'll have an <ul>. Ugly hack, I know.
147 147
 		// TODO: Un-hack this
148
-		$hide_settings_link = ( empty( $this->item['settings_html'] ) || strpos( $this->item['settings_html'], '<!-- No Options -->' ) > 0 ) ? 'hide-if-js' : '';
148
+		$hide_settings_link = ( empty( $this->item[ 'settings_html' ] ) || strpos( $this->item[ 'settings_html' ], '<!-- No Options -->' ) > 0 ) ? 'hide-if-js' : '';
149 149
 		$settings_link      = sprintf( '<a href="#settings" class="dashicons-admin-generic dashicons %s" title="%s"></a>', $hide_settings_link, esc_attr( $settings_title ) );
150 150
 
151 151
 		// Should we show the icon that the field is being used as a link to single entry?
152
-		$hide_show_as_link_class = empty( $this->settings['show_as_link'] ) ? 'hide-if-js' : '';
152
+		$hide_show_as_link_class = empty( $this->settings[ 'show_as_link' ] ) ? 'hide-if-js' : '';
153 153
 		$show_as_link            = '<span class="dashicons dashicons-admin-links ' . $hide_show_as_link_class . '" title="' . esc_attr( $single_link_title ) . '"></span>';
154 154
 
155 155
 		// When a field label is empty, use the Field ID
156 156
 		$label = empty( $this->title ) ? sprintf( _x( 'Field #%s (No Label)', 'Label in field picker for empty label', 'gravityview' ), $this->id ) : $this->title;
157 157
 
158 158
 		// If there's a custom label, and show label is checked, use that as the field heading
159
-		if ( ! empty( $this->settings['custom_label'] ) && ! empty( $this->settings['show_label'] ) ) {
160
-			$label = $this->settings['custom_label'];
161
-		} else if ( ! empty( $this->item['customLabel'] ) ) {
162
-			$label = $this->item['customLabel'];
159
+		if ( ! empty( $this->settings[ 'custom_label' ] ) && ! empty( $this->settings[ 'show_label' ] ) ) {
160
+			$label = $this->settings[ 'custom_label' ];
161
+		} else if ( ! empty( $this->item[ 'customLabel' ] ) ) {
162
+			$label = $this->item[ 'customLabel' ];
163 163
 		}
164 164
 
165 165
 		$output = '<h5 class="selectable gfield field-id-' . esc_attr( $this->id ) . '">';
166 166
 
167 167
 		$label = esc_attr( $label );
168 168
 
169
-		if ( ! empty( $this->item['parent'] ) ) {
170
-			$label .= ' <small>(' . esc_attr( $this->item['parent']['label'] ) . ')</small>';
169
+		if ( ! empty( $this->item[ 'parent' ] ) ) {
170
+			$label .= ' <small>(' . esc_attr( $this->item[ 'parent' ][ 'label' ] ) . ')</small>';
171 171
 		}
172 172
 
173 173
 		// Name of field / widget
@@ -183,10 +183,10 @@  discard block
 block discarded – undo
183 183
 
184 184
 		$output .= '</h5>';
185 185
 
186
-		$container_class = ! empty( $this->item['parent'] ) ? ' gv-child-field' : '';
187
-		$data_form_id   = ! empty( $this->form_id ) ? 'data-formid="' . esc_attr( $this->form_id ) . '"' : '';
186
+		$container_class = ! empty( $this->item[ 'parent' ] ) ? ' gv-child-field' : '';
187
+		$data_form_id = ! empty( $this->form_id ) ? 'data-formid="' . esc_attr( $this->form_id ) . '"' : '';
188 188
 
189
-		$output = '<div data-fieldtype="' . esc_html($this->label_type) .'" data-fieldid="' . esc_attr( $this->id ) . '" ' . $data_form_id . ' data-inputtype="' . esc_attr( $this->item['input_type'] ) . '" class="gv-fields' . $container_class . '">' . $output . $this->item['settings_html'] . '</div>';
189
+		$output = '<div data-fieldtype="' . esc_html( $this->label_type ) . '" data-fieldid="' . esc_attr( $this->id ) . '" ' . $data_form_id . ' data-inputtype="' . esc_attr( $this->item[ 'input_type' ] ) . '" class="gv-fields' . $container_class . '">' . $output . $this->item[ 'settings_html' ] . '</div>';
190 190
 
191 191
 		return $output;
192 192
 	}
Please login to merge, or discard this patch.
includes/class-admin-views.php 2 patches
Indentation   +84 added lines, -84 removed lines patch added patch discarded remove patch
@@ -61,28 +61,28 @@  discard block
 block discarded – undo
61 61
 	}
62 62
 
63 63
 	/**
64
-     * When on the Add/Edit View screen, suggest most popular articles related to that
65
-     *
64
+	 * When on the Add/Edit View screen, suggest most popular articles related to that
65
+	 *
66 66
 	 * @param array $localization_data Data to be passed to the Support Port JS
67 67
 	 *
68 68
 	 * @return array
69 69
 	 */
70 70
 	function suggest_support_articles( $localization_data = array() ) {
71 71
 
72
-	    if( ! gravityview()->request->is_view() ) {
73
-	        return $localization_data;
74
-        }
72
+		if( ! gravityview()->request->is_view() ) {
73
+			return $localization_data;
74
+		}
75 75
 
76 76
 		$localization_data['suggest'] = array(
77
-            '57ef23539033602e61d4a560',
78
-            '54c67bb9e4b0512429885513',
79
-            '54c67bb9e4b0512429885512',
80
-            '54c67bbbe4b07997ea3f3f6b',
81
-            '54d1a33ae4b086c0c0964ce9',
82
-            '57ef253c9033602e61d4a563',
83
-            '552355bfe4b0221aadf2572b',
84
-            '54c67bcde4b051242988553e',
85
-        );
77
+			'57ef23539033602e61d4a560',
78
+			'54c67bb9e4b0512429885513',
79
+			'54c67bb9e4b0512429885512',
80
+			'54c67bbbe4b07997ea3f3f6b',
81
+			'54d1a33ae4b086c0c0964ce9',
82
+			'57ef253c9033602e61d4a563',
83
+			'552355bfe4b0221aadf2572b',
84
+			'54c67bcde4b051242988553e',
85
+		);
86 86
 
87 87
 		return $localization_data;
88 88
 	}
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
 		if( empty( $connected_views ) ) {
168 168
 
169
-		    $menu_items['gravityview'] = array(
169
+			$menu_items['gravityview'] = array(
170 170
 				'label'          => esc_attr__( 'Create a View', 'gravityview' ),
171 171
 				'icon'           => '<i class="fa fa-lg gv-icon-astronaut-head gv-icon"></i>',
172 172
 				'title'          => esc_attr__( 'Create a View using this form as a data source', 'gravityview' ),
@@ -197,13 +197,13 @@  discard block
 block discarded – undo
197 197
 		// If there were no items added, then let's create the parent menu
198 198
 		if( $sub_menu_items ) {
199 199
 
200
-		    $sub_menu_items[] = array(
201
-			    'label' => esc_attr__( 'Create a View', 'gravityview' ),
202
-                'link_class' => 'gv-create-view',
203
-			    'title' => esc_attr__( 'Create a View using this form as a data source', 'gravityview' ),
204
-			    'url'   => admin_url( 'post-new.php?post_type=gravityview&form_id=' . $id ),
205
-			    'capabilities'   => array( 'edit_gravityviews' ),
206
-            );
200
+			$sub_menu_items[] = array(
201
+				'label' => esc_attr__( 'Create a View', 'gravityview' ),
202
+				'link_class' => 'gv-create-view',
203
+				'title' => esc_attr__( 'Create a View using this form as a data source', 'gravityview' ),
204
+				'url'   => admin_url( 'post-new.php?post_type=gravityview&form_id=' . $id ),
205
+				'capabilities'   => array( 'edit_gravityviews' ),
206
+			);
207 207
 
208 208
 			// Make sure Gravity Forms uses the submenu; if there's only one item, it uses a link instead of a dropdown
209 209
 			$sub_menu_items[] = array(
@@ -587,12 +587,12 @@  discard block
 block discarded – undo
587 587
 	 * Render html for displaying available fields based on a Form ID
588 588
 	 * $blacklist_field_types - contains the field types which are not proper to be shown in a directory.
589 589
 	 *
590
-     * @see GravityView_Ajax::get_available_fields_html() Triggers `gravityview_render_available_fields` action
590
+	 * @see GravityView_Ajax::get_available_fields_html() Triggers `gravityview_render_available_fields` action
591 591
 	 * @access public
592
-     *
592
+	 *
593 593
 	 * @param int $form Gravity Forms Form ID (default: '')
594 594
 	 * @param string $context (default: 'single')
595
-     *
595
+	 *
596 596
 	 * @return void
597 597
 	 */
598 598
 	function render_available_fields( $form = 0, $context = 'single' ) {
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
 
607 607
 		if ( ! is_array( $blacklist_field_types ) ) {
608 608
 
609
-		    gravityview()->log->error( '$blacklist_field_types is not an array', array( 'data' => print_r( $blacklist_field_types, true ) ) );
609
+			gravityview()->log->error( '$blacklist_field_types is not an array', array( 'data' => print_r( $blacklist_field_types, true ) ) );
610 610
 
611 611
 			$blacklist_field_types = array();
612 612
 		}
@@ -737,12 +737,12 @@  discard block
 block discarded – undo
737 737
 				/**
738 738
 				 * @since 1.7.2
739 739
 				 */
740
-			    'other_entries' => array(
741
-				    'label'	=> __('Other Entries', 'gravityview'),
742
-				    'type'	=> 'other_entries',
743
-				    'desc'	=> __('Display other entries created by the entry creator.', 'gravityview'),
744
-			    ),
745
-	        );
740
+				'other_entries' => array(
741
+					'label'	=> __('Other Entries', 'gravityview'),
742
+					'type'	=> 'other_entries',
743
+					'desc'	=> __('Display other entries created by the entry creator.', 'gravityview'),
744
+				),
745
+			);
746 746
 
747 747
 			if( 'single' !== $zone) {
748 748
 
@@ -875,9 +875,9 @@  discard block
 block discarded – undo
875 875
 
876 876
 				$joined_forms = gravityview_get_joined_forms( $post->ID );
877 877
 
878
-                foreach ( $joined_forms as $form ) {
879
-                    $available_items[ $form->ID ] = $this->get_available_fields( $form->ID, $zone );
880
-                }
878
+				foreach ( $joined_forms as $form ) {
879
+					$available_items[ $form->ID ] = $this->get_available_fields( $form->ID, $zone );
880
+				}
881 881
 			} else {
882 882
 				$available_items[ $form ] = $this->get_registered_widgets();
883 883
 			}
@@ -906,9 +906,9 @@  discard block
 block discarded – undo
906 906
 
907 907
 										if ( $form_id ) {
908 908
 											$original_item = isset( $available_items[ $form_id ] [ $field['id'] ] ) ? $available_items[ $form_id ] [ $field['id'] ] : false ;
909
-                                        } else {
909
+										} else {
910 910
 											$original_item = isset( $available_items[ $field['id'] ] ) ? $available_items[ $field['id'] ] : false ;
911
-                                        }
911
+										}
912 912
 
913 913
 										if ( !$original_item ) {
914 914
 											gravityview()->log->error( 'An item was not available when rendering the output; maybe it was added by a plugin that is now de-activated.', array(' data' => array('available_items' => $available_items, 'field' => $field ) ) );
@@ -1028,7 +1028,7 @@  discard block
 block discarded – undo
1028 1028
 			'edit_link',
1029 1029
 			'delete_link',
1030 1030
 			'entry_map',
1031
-            'default_field' // this will be used for all fields/widget that don't have their own templates
1031
+			'default_field' // this will be used for all fields/widget that don't have their own templates
1032 1032
 		);
1033 1033
 
1034 1034
 		foreach ( $fields as $input_type ) {
@@ -1038,13 +1038,13 @@  discard block
 block discarded – undo
1038 1038
 	}
1039 1039
 
1040 1040
 	/**
1041
-     * Renders "Add Field" tooltips
1042
-     *
1043
-     * @since 2.0.11
1044
-     *
1041
+	 * Renders "Add Field" tooltips
1042
+	 *
1043
+	 * @since 2.0.11
1044
+	 *
1045 1045
 	 * @param string $context "directory", "single", or "edit"
1046
-     *
1047
-     * @return void
1046
+	 *
1047
+	 * @return void
1048 1048
 	 */
1049 1049
 	function render_field_pickers( $context = 'directory' ) {
1050 1050
 
@@ -1071,7 +1071,7 @@  discard block
 block discarded – undo
1071 1071
             </div>
1072 1072
 			<?php
1073 1073
 		}
1074
-    }
1074
+	}
1075 1075
 
1076 1076
 	/**
1077 1077
 	 * Render the Template Active Areas and configured active fields for a given template id and post id
@@ -1143,59 +1143,59 @@  discard block
 block discarded – undo
1143 1143
 
1144 1144
 		// Don't process any scripts below here if it's not a GravityView page.
1145 1145
 		if( ! gravityview_is_admin_page( $hook, 'single' ) && ! $is_widgets_page ) {
1146
-		    return;
1146
+			return;
1147 1147
 		}
1148 1148
 
1149
-        wp_enqueue_script( 'jquery-ui-datepicker' );
1150
-        wp_enqueue_style( 'gravityview_views_datepicker', plugins_url('assets/css/admin-datepicker.css', GRAVITYVIEW_FILE), GravityView_Plugin::version );
1151
-
1152
-        $script_debug = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min';
1153
-
1154
-        //enqueue scripts
1155
-        wp_enqueue_script( 'gravityview_views_scripts', plugins_url( 'assets/js/admin-views' . $script_debug . '.js', GRAVITYVIEW_FILE ), array( 'jquery-ui-tabs', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-ui-tooltip', 'jquery-ui-dialog', 'gravityview-jquery-cookie', 'jquery-ui-datepicker', 'underscore' ), GravityView_Plugin::version );
1156
-
1157
-        wp_localize_script('gravityview_views_scripts', 'gvGlobals', array(
1158
-            'cookiepath' => COOKIEPATH,
1159
-            'passed_form_id' => (bool) \GV\Utils::_GET( 'form_id' ),
1160
-            'nonce' => wp_create_nonce( 'gravityview_ajaxviews' ),
1161
-            'label_viewname' => __( 'Enter View name here', 'gravityview' ),
1162
-            'label_close' => __( 'Close', 'gravityview' ),
1163
-            'label_cancel' => __( 'Cancel', 'gravityview' ),
1164
-            'label_continue' => __( 'Continue', 'gravityview' ),
1165
-            'label_ok' => __( 'Ok', 'gravityview' ),
1166
-            'label_publisherror' => __( 'Error while creating the View for you. Check the settings or contact GravityView support.', 'gravityview' ),
1167
-            'loading_text' => esc_html__( 'Loading&hellip;', 'gravityview' ),
1168
-            'loading_error' => esc_html__( 'There was an error loading dynamic content.', 'gravityview' ),
1169
-            'field_loaderror' => __( 'Error while adding the field. Please try again or contact GravityView support.', 'gravityview' ),
1170
-            'remove_all_fields' => __( 'Would you like to remove all fields in this zone? (You are seeing this message because you were holding down the ALT key)', 'gravityview' ),
1171
-        ));
1172
-
1173
-        wp_enqueue_style( 'gravityview_views_styles', plugins_url( 'assets/css/admin-views.css', GRAVITYVIEW_FILE ), array('dashicons', 'wp-jquery-ui-dialog' ), GravityView_Plugin::version );
1174
-
1175
-        // Enqueue scripts needed for merge tags
1176
-        self::enqueue_gravity_forms_scripts();
1149
+		wp_enqueue_script( 'jquery-ui-datepicker' );
1150
+		wp_enqueue_style( 'gravityview_views_datepicker', plugins_url('assets/css/admin-datepicker.css', GRAVITYVIEW_FILE), GravityView_Plugin::version );
1151
+
1152
+		$script_debug = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min';
1153
+
1154
+		//enqueue scripts
1155
+		wp_enqueue_script( 'gravityview_views_scripts', plugins_url( 'assets/js/admin-views' . $script_debug . '.js', GRAVITYVIEW_FILE ), array( 'jquery-ui-tabs', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-ui-tooltip', 'jquery-ui-dialog', 'gravityview-jquery-cookie', 'jquery-ui-datepicker', 'underscore' ), GravityView_Plugin::version );
1156
+
1157
+		wp_localize_script('gravityview_views_scripts', 'gvGlobals', array(
1158
+			'cookiepath' => COOKIEPATH,
1159
+			'passed_form_id' => (bool) \GV\Utils::_GET( 'form_id' ),
1160
+			'nonce' => wp_create_nonce( 'gravityview_ajaxviews' ),
1161
+			'label_viewname' => __( 'Enter View name here', 'gravityview' ),
1162
+			'label_close' => __( 'Close', 'gravityview' ),
1163
+			'label_cancel' => __( 'Cancel', 'gravityview' ),
1164
+			'label_continue' => __( 'Continue', 'gravityview' ),
1165
+			'label_ok' => __( 'Ok', 'gravityview' ),
1166
+			'label_publisherror' => __( 'Error while creating the View for you. Check the settings or contact GravityView support.', 'gravityview' ),
1167
+			'loading_text' => esc_html__( 'Loading&hellip;', 'gravityview' ),
1168
+			'loading_error' => esc_html__( 'There was an error loading dynamic content.', 'gravityview' ),
1169
+			'field_loaderror' => __( 'Error while adding the field. Please try again or contact GravityView support.', 'gravityview' ),
1170
+			'remove_all_fields' => __( 'Would you like to remove all fields in this zone? (You are seeing this message because you were holding down the ALT key)', 'gravityview' ),
1171
+		));
1172
+
1173
+		wp_enqueue_style( 'gravityview_views_styles', plugins_url( 'assets/css/admin-views.css', GRAVITYVIEW_FILE ), array('dashicons', 'wp-jquery-ui-dialog' ), GravityView_Plugin::version );
1174
+
1175
+		// Enqueue scripts needed for merge tags
1176
+		self::enqueue_gravity_forms_scripts();
1177 1177
 	}
1178 1178
 
1179 1179
 	/**
1180 1180
 	 * Enqueue Gravity Forms scripts, needed for Merge Tags
1181
-     *
1182
-     * @since 1.0.5-beta
1183
-     *
1184
-     * @return void
1181
+	 *
1182
+	 * @since 1.0.5-beta
1183
+	 *
1184
+	 * @return void
1185 1185
 	 */
1186 1186
 	static function enqueue_gravity_forms_scripts() {
1187 1187
 		GFForms::register_scripts();
1188 1188
 
1189 1189
 		$scripts = array(
1190
-		    'sack',
1191
-		    'gform_gravityforms',
1192
-		    'gform_forms',
1193
-		    'gform_form_admin',
1194
-		    'jquery-ui-autocomplete'
1190
+			'sack',
1191
+			'gform_gravityforms',
1192
+			'gform_forms',
1193
+			'gform_form_admin',
1194
+			'jquery-ui-autocomplete'
1195 1195
 		);
1196 1196
 
1197 1197
 		if ( wp_is_mobile() ) {
1198
-		    $scripts[] = 'jquery-touch-punch';
1198
+			$scripts[] = 'jquery-touch-punch';
1199 1199
 		}
1200 1200
 
1201 1201
 		wp_enqueue_script( $scripts );
Please login to merge, or discard this patch.
Spacing   +182 added lines, -182 removed lines patch added patch discarded remove patch
@@ -28,29 +28,29 @@  discard block
 block discarded – undo
28 28
 		add_filter( 'gravityview_blacklist_field_types', array( $this, 'default_field_blacklist' ), 10, 2 );
29 29
 
30 30
 		// Tooltips
31
-		add_filter( 'gform_tooltips', array( $this, 'tooltips') );
31
+		add_filter( 'gform_tooltips', array( $this, 'tooltips' ) );
32 32
 
33 33
 		// adding styles and scripts
34
-		add_action( 'admin_enqueue_scripts', array( 'GravityView_Admin_Views', 'add_scripts_and_styles'), 999 );
35
-		add_filter( 'gform_noconflict_styles', array( $this, 'register_no_conflict') );
36
-		add_filter( 'gform_noconflict_scripts', array( $this, 'register_no_conflict') );
37
-		add_filter( 'gravityview_noconflict_styles', array( $this, 'register_no_conflict') );
38
-		add_filter( 'gravityview_noconflict_scripts', array( $this, 'register_no_conflict') );
39
-
40
-		add_action( 'gravityview_render_directory_active_areas', array( $this, 'render_directory_active_areas'), 10, 4 );
41
-		add_action( 'gravityview_render_widgets_active_areas', array( $this, 'render_widgets_active_areas'), 10, 3 );
42
-		add_action( 'gravityview_render_field_pickers', array( $this, 'render_field_pickers') );
43
-		add_action( 'gravityview_render_field_and_widget_options', array( $this, 'render_field_and_widget_options'), 10, 2 );
44
-		add_action( 'gravityview_render_available_fields', array( $this, 'render_available_fields'), 10, 2 );
45
-		add_action( 'gravityview_render_available_widgets', array( $this, 'render_available_widgets') );
46
-		add_action( 'gravityview_render_active_areas', array( $this, 'render_active_areas'), 10, 5 );
34
+		add_action( 'admin_enqueue_scripts', array( 'GravityView_Admin_Views', 'add_scripts_and_styles' ), 999 );
35
+		add_filter( 'gform_noconflict_styles', array( $this, 'register_no_conflict' ) );
36
+		add_filter( 'gform_noconflict_scripts', array( $this, 'register_no_conflict' ) );
37
+		add_filter( 'gravityview_noconflict_styles', array( $this, 'register_no_conflict' ) );
38
+		add_filter( 'gravityview_noconflict_scripts', array( $this, 'register_no_conflict' ) );
39
+
40
+		add_action( 'gravityview_render_directory_active_areas', array( $this, 'render_directory_active_areas' ), 10, 4 );
41
+		add_action( 'gravityview_render_widgets_active_areas', array( $this, 'render_widgets_active_areas' ), 10, 3 );
42
+		add_action( 'gravityview_render_field_pickers', array( $this, 'render_field_pickers' ) );
43
+		add_action( 'gravityview_render_field_and_widget_options', array( $this, 'render_field_and_widget_options' ), 10, 2 );
44
+		add_action( 'gravityview_render_available_fields', array( $this, 'render_available_fields' ), 10, 2 );
45
+		add_action( 'gravityview_render_available_widgets', array( $this, 'render_available_widgets' ) );
46
+		add_action( 'gravityview_render_active_areas', array( $this, 'render_active_areas' ), 10, 5 );
47 47
 
48 48
 		// Add Connected Form column
49
-		add_filter('manage_gravityview_posts_columns' , array( $this, 'add_post_type_columns' ) );
49
+		add_filter( 'manage_gravityview_posts_columns', array( $this, 'add_post_type_columns' ) );
50 50
 
51 51
 		add_filter( 'gform_toolbar_menu', array( 'GravityView_Admin_Views', 'gform_toolbar_menu' ), 10, 2 );
52 52
 
53
-		add_action( 'manage_gravityview_posts_custom_column', array( $this, 'add_custom_column_content'), 10, 2 );
53
+		add_action( 'manage_gravityview_posts_custom_column', array( $this, 'add_custom_column_content' ), 10, 2 );
54 54
 
55 55
 		add_action( 'restrict_manage_posts', array( $this, 'add_view_dropdown' ) );
56 56
 
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
 	 */
70 70
 	function suggest_support_articles( $localization_data = array() ) {
71 71
 
72
-	    if( ! gravityview()->request->is_view() ) {
72
+	    if ( ! gravityview()->request->is_view() ) {
73 73
 	        return $localization_data;
74 74
         }
75 75
 
76
-		$localization_data['suggest'] = array(
76
+		$localization_data[ 'suggest' ] = array(
77 77
             '57ef23539033602e61d4a560',
78 78
             '54c67bb9e4b0512429885513',
79 79
             '54c67bb9e4b0512429885512',
@@ -94,13 +94,13 @@  discard block
 block discarded – undo
94 94
 	public function filter_pre_get_posts_by_gravityview_form_id( &$query ) {
95 95
 		global $pagenow;
96 96
 
97
-		if ( !is_admin() ) {
97
+		if ( ! is_admin() ) {
98 98
 			return;
99 99
 		}
100 100
 
101
-		$form_id = isset( $_GET['gravityview_form_id'] ) ? (int) $_GET['gravityview_form_id'] : false;
101
+		$form_id = isset( $_GET[ 'gravityview_form_id' ] ) ? (int)$_GET[ 'gravityview_form_id' ] : false;
102 102
 
103
-		if( 'edit.php' !== $pagenow || ! $form_id || ! isset( $query->query_vars[ 'post_type' ] ) ) {
103
+		if ( 'edit.php' !== $pagenow || ! $form_id || ! isset( $query->query_vars[ 'post_type' ] ) ) {
104 104
 			return;
105 105
 		}
106 106
 
@@ -117,18 +117,18 @@  discard block
 block discarded – undo
117 117
 	function add_view_dropdown() {
118 118
 		$current_screen = get_current_screen();
119 119
 
120
-		if( 'gravityview' !== $current_screen->post_type ) {
120
+		if ( 'gravityview' !== $current_screen->post_type ) {
121 121
 			return;
122 122
 		}
123 123
 
124 124
 		$forms = gravityview_get_forms();
125 125
 		$current_form = \GV\Utils::_GET( 'gravityview_form_id' );
126 126
 		// If there are no forms to select, show no forms.
127
-		if( !empty( $forms ) ) { ?>
127
+		if ( ! empty( $forms ) ) { ?>
128 128
 			<select name="gravityview_form_id" id="gravityview_form_id">
129 129
 				<option value="" <?php selected( '', $current_form, true ); ?>><?php esc_html_e( 'All forms', 'gravityview' ); ?></option>
130
-				<?php foreach( $forms as $form ) { ?>
131
-					<option value="<?php echo $form['id']; ?>" <?php selected( $form['id'], $current_form, true ); ?>><?php echo esc_html( $form['title'] ); ?></option>
130
+				<?php foreach ( $forms as $form ) { ?>
131
+					<option value="<?php echo $form[ 'id' ]; ?>" <?php selected( $form[ 'id' ], $current_form, true ); ?>><?php echo esc_html( $form[ 'title' ] ); ?></option>
132 132
 				<?php } ?>
133 133
 			</select>
134 134
 		<?php }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	 */
142 142
 	public static function render_setting_row( $key = '', $current_settings = array(), $override_input = null, $name = 'template_settings[%s]', $id = 'gravityview_se_%s' ) {
143 143
 		_deprecated_function( 'GravityView_Admin_Views::render_setting_row', '1.1.7', 'GravityView_Render_Settings::render_setting_row' );
144
-		GravityView_Render_Settings::render_setting_row( $key, $current_settings, $override_input, $name , $id );
144
+		GravityView_Render_Settings::render_setting_row( $key, $current_settings, $override_input, $name, $id );
145 145
 	}
146 146
 
147 147
 	/**
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
 
165 165
 		$connected_views = gravityview_get_connected_views( $id, array( 'post_status' => 'any' ) );
166 166
 
167
-		if( empty( $connected_views ) ) {
167
+		if ( empty( $connected_views ) ) {
168 168
 
169
-		    $menu_items['gravityview'] = array(
169
+		    $menu_items[ 'gravityview' ] = array(
170 170
 				'label'          => esc_attr__( 'Create a View', 'gravityview' ),
171 171
 				'icon'           => '<i class="fa fa-lg gv-icon-astronaut-head gv-icon"></i>',
172 172
 				'title'          => esc_attr__( 'Create a View using this form as a data source', 'gravityview' ),
@@ -182,22 +182,22 @@  discard block
 block discarded – undo
182 182
 		$sub_menu_items = array();
183 183
 		foreach ( (array)$connected_views as $view ) {
184 184
 
185
-			if( ! GVCommon::has_cap( 'edit_gravityview', $view->ID ) ) {
185
+			if ( ! GVCommon::has_cap( 'edit_gravityview', $view->ID ) ) {
186 186
 				continue;
187 187
 			}
188 188
 
189
-			$label = empty( $view->post_title ) ? sprintf( __('No Title (View #%d)', 'gravityview' ), $view->ID ) : $view->post_title;
189
+			$label = empty( $view->post_title ) ? sprintf( __( 'No Title (View #%d)', 'gravityview' ), $view->ID ) : $view->post_title;
190 190
 
191
-			$sub_menu_items[] = array(
191
+			$sub_menu_items[ ] = array(
192 192
 				'label' => esc_attr( $label ),
193
-				'url' => admin_url( 'post.php?action=edit&post='.$view->ID ),
193
+				'url' => admin_url( 'post.php?action=edit&post=' . $view->ID ),
194 194
 			);
195 195
 		}
196 196
 
197 197
 		// If there were no items added, then let's create the parent menu
198
-		if( $sub_menu_items ) {
198
+		if ( $sub_menu_items ) {
199 199
 
200
-		    $sub_menu_items[] = array(
200
+		    $sub_menu_items[ ] = array(
201 201
 			    'label' => esc_attr__( 'Create a View', 'gravityview' ),
202 202
                 'link_class' => 'gv-create-view',
203 203
 			    'title' => esc_attr__( 'Create a View using this form as a data source', 'gravityview' ),
@@ -206,14 +206,14 @@  discard block
 block discarded – undo
206 206
             );
207 207
 
208 208
 			// Make sure Gravity Forms uses the submenu; if there's only one item, it uses a link instead of a dropdown
209
-			$sub_menu_items[] = array(
209
+			$sub_menu_items[ ] = array(
210 210
 				'url' => '#',
211 211
 				'label' => '',
212 212
 				'menu_class' => 'hidden',
213 213
 				'capabilities' => '',
214 214
 			);
215 215
 
216
-			$menu_items['gravityview'] = array(
216
+			$menu_items[ 'gravityview' ] = array(
217 217
 				'label'          => __( 'Connected Views', 'gravityview' ),
218 218
 				'icon'           => '<i class="fa fa-lg gv-icon-astronaut-head gv-icon"></i>',
219 219
 				'title'          => __( 'GravityView Views using this form as a data source', 'gravityview' ),
@@ -242,8 +242,8 @@  discard block
 block discarded – undo
242 242
 		$add = array( 'captcha', 'page' );
243 243
 
244 244
 		// Don't allowing editing the following values:
245
-		if( $context === 'edit' ) {
246
-			$add[] = 'post_id';
245
+		if ( $context === 'edit' ) {
246
+			$add[ ] = 'post_id';
247 247
 		}
248 248
 
249 249
 		$return = array_merge( $array, $add );
@@ -266,32 +266,32 @@  discard block
 block discarded – undo
266 266
 		foreach ( $default_args as $key => $arg ) {
267 267
 
268 268
 			// If an arg has `tooltip` defined, but it's false, don't display a tooltip
269
-			if( isset( $arg['tooltip'] ) && empty( $arg['tooltip'] ) ) { continue; }
269
+			if ( isset( $arg[ 'tooltip' ] ) && empty( $arg[ 'tooltip' ] ) ) { continue; }
270 270
 
271 271
 			// By default, use `tooltip` if defined.
272
-			$tooltip = empty( $arg['tooltip'] ) ? NULL : $arg['tooltip'];
272
+			$tooltip = empty( $arg[ 'tooltip' ] ) ? NULL : $arg[ 'tooltip' ];
273 273
 
274 274
 			// Otherwise, use the description as a tooltip.
275
-			if( empty( $tooltip ) && !empty( $arg['desc'] ) ) {
276
-				$tooltip = $arg['desc'];
275
+			if ( empty( $tooltip ) && ! empty( $arg[ 'desc' ] ) ) {
276
+				$tooltip = $arg[ 'desc' ];
277 277
 			}
278 278
 
279 279
 			// If there's no tooltip set, continue
280
-			if( empty( $tooltip ) ) {
280
+			if ( empty( $tooltip ) ) {
281 281
 				continue;
282 282
 			}
283 283
 
284 284
 			// Add the tooltip
285
-			$gv_tooltips[ 'gv_'.$key ] = array(
286
-				'title'	=> $arg['label'],
285
+			$gv_tooltips[ 'gv_' . $key ] = array(
286
+				'title'	=> $arg[ 'label' ],
287 287
 				'value'	=> $tooltip,
288 288
 			);
289 289
 
290 290
 		}
291 291
 
292
-		$gv_tooltips['gv_css_merge_tags'] = array(
293
-			'title' => __('CSS Merge Tags', 'gravityview'),
294
-			'value' => sprintf( __( 'Developers: The CSS classes will be sanitized using the %ssanitize_title_with_dashes()%s function.', 'gravityview'), '<code>', '</code>' )
292
+		$gv_tooltips[ 'gv_css_merge_tags' ] = array(
293
+			'title' => __( 'CSS Merge Tags', 'gravityview' ),
294
+			'value' => sprintf( __( 'Developers: The CSS classes will be sanitized using the %ssanitize_title_with_dashes()%s function.', 'gravityview' ), '<code>', '</code>' )
295 295
 		);
296 296
 
297 297
 		/**
@@ -309,9 +309,9 @@  discard block
 block discarded – undo
309 309
 
310 310
 		foreach ( $gv_tooltips as $key => $tooltip ) {
311 311
 
312
-			$title = empty( $tooltip['title'] ) ? '' : '<h6>'.esc_html( $tooltip['title'] ) .'</h6>';
312
+			$title = empty( $tooltip[ 'title' ] ) ? '' : '<h6>' . esc_html( $tooltip[ 'title' ] ) . '</h6>';
313 313
 
314
-			$tooltips[ $key ] = $title . wpautop( esc_html( $tooltip['value'] ) );
314
+			$tooltips[ $key ] = $title . wpautop( esc_html( $tooltip[ 'value' ] ) );
315 315
 		}
316 316
 
317 317
 		return $tooltips;
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 	 *
326 326
 	 * @return void
327 327
 	 */
328
-	public function add_custom_column_content( $column_name = NULL, $post_id )	{
328
+	public function add_custom_column_content( $column_name = NULL, $post_id ) {
329 329
 
330 330
 		$output = '';
331 331
 
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 				// Generate backup if label doesn't exist: `example_name` => `Example Name`
348 348
 				$template_id_pretty = ucwords( implode( ' ', explode( '_', $template_id ) ) );
349 349
 
350
-				$output = $template ? $template['label'] : $template_id_pretty;
350
+				$output = $template ? $template[ 'label' ] : $template_id_pretty;
351 351
 
352 352
 				break;
353 353
 
@@ -388,44 +388,44 @@  discard block
 block discarded – undo
388 388
 	static public function get_connected_form_links( $form, $include_form_link = true ) {
389 389
 
390 390
 		// Either the form is empty or the form ID is 0, not yet set.
391
-		if( empty( $form ) ) {
391
+		if ( empty( $form ) ) {
392 392
 			return '';
393 393
 		}
394 394
 
395 395
 		// The $form is passed as the form ID
396
-		if( !is_array( $form ) ) {
396
+		if ( ! is_array( $form ) ) {
397 397
 			$form = gravityview_get_form( $form );
398 398
 		}
399 399
 
400
-		$form_id = $form['id'];
400
+		$form_id = $form[ 'id' ];
401 401
 		$links = array();
402 402
 
403
-		if( GVCommon::has_cap( 'gravityforms_edit_forms' ) ) {
403
+		if ( GVCommon::has_cap( 'gravityforms_edit_forms' ) ) {
404 404
 			$form_url = admin_url( sprintf( 'admin.php?page=gf_edit_forms&amp;id=%d', $form_id ) );
405
-			$form_link = '<strong class="gv-form-title">'.gravityview_get_link( $form_url, $form['title'], 'class=row-title' ).'</strong>';
406
-			$links[] = '<span>'.gravityview_get_link( $form_url, __('Edit Form', 'gravityview') ).'</span>';
405
+			$form_link = '<strong class="gv-form-title">' . gravityview_get_link( $form_url, $form[ 'title' ], 'class=row-title' ) . '</strong>';
406
+			$links[ ] = '<span>' . gravityview_get_link( $form_url, __( 'Edit Form', 'gravityview' ) ) . '</span>';
407 407
 		} else {
408
-			$form_link = '<strong class="gv-form-title">'. esc_html( $form['title'] ). '</strong>';
408
+			$form_link = '<strong class="gv-form-title">' . esc_html( $form[ 'title' ] ) . '</strong>';
409 409
 		}
410 410
 
411
-		if( GVCommon::has_cap( 'gravityforms_view_entries' ) ) {
411
+		if ( GVCommon::has_cap( 'gravityforms_view_entries' ) ) {
412 412
 			$entries_url = admin_url( sprintf( 'admin.php?page=gf_entries&amp;id=%d', $form_id ) );
413
-			$links[] = '<span>'.gravityview_get_link( $entries_url, __('Entries', 'gravityview') ).'</span>';
413
+			$links[ ] = '<span>' . gravityview_get_link( $entries_url, __( 'Entries', 'gravityview' ) ) . '</span>';
414 414
 		}
415 415
 
416
-		if( GVCommon::has_cap( array( 'gravityforms_edit_settings', 'gravityview_view_settings' ) ) ) {
416
+		if ( GVCommon::has_cap( array( 'gravityforms_edit_settings', 'gravityview_view_settings' ) ) ) {
417 417
 			$settings_url = admin_url( sprintf( 'admin.php?page=gf_edit_forms&amp;view=settings&amp;id=%d', $form_id ) );
418
-			$links[] = '<span>'.gravityview_get_link( $settings_url, __('Settings', 'gravityview'), 'title='.__('Edit settings for this form', 'gravityview') ).'</span>';
418
+			$links[ ] = '<span>' . gravityview_get_link( $settings_url, __( 'Settings', 'gravityview' ), 'title=' . __( 'Edit settings for this form', 'gravityview' ) ) . '</span>';
419 419
 		}
420 420
 
421
-		if( GVCommon::has_cap( array("gravityforms_edit_forms", "gravityforms_create_form", "gravityforms_preview_forms") ) ) {
421
+		if ( GVCommon::has_cap( array( "gravityforms_edit_forms", "gravityforms_create_form", "gravityforms_preview_forms" ) ) ) {
422 422
 			$preview_url = site_url( sprintf( '?gf_page=preview&amp;id=%d', $form_id ) );
423
-			$links[] = '<span>'.gravityview_get_link( $preview_url, __('Preview Form', 'gravityview'), 'title='.__('Preview this form', 'gravityview') ).'</span>';
423
+			$links[ ] = '<span>' . gravityview_get_link( $preview_url, __( 'Preview Form', 'gravityview' ), 'title=' . __( 'Preview this form', 'gravityview' ) ) . '</span>';
424 424
 		}
425 425
 
426 426
 		$output = '';
427 427
 
428
-		if( !empty( $include_form_link ) ) {
428
+		if ( ! empty( $include_form_link ) ) {
429 429
 			$output .= $form_link;
430 430
 		}
431 431
 
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 		 */
438 438
 		$links = apply_filters( 'gravityview_connected_form_links', $links, $form );
439 439
 
440
-		$output .= '<div class="row-actions">'. implode( ' | ', $links ) .'</div>';
440
+		$output .= '<div class="row-actions">' . implode( ' | ', $links ) . '</div>';
441 441
 
442 442
 		return $output;
443 443
 	}
@@ -451,8 +451,8 @@  discard block
 block discarded – undo
451 451
 		// Get the date column and save it for later to add back in.
452 452
 		// This adds it after the Data Source column.
453 453
 		// This way, we don't need to do array_slice, array_merge, etc.
454
-		$date = $columns['date'];
455
-		unset( $columns['date'] );
454
+		$date = $columns[ 'date' ];
455
+		unset( $columns[ 'date' ] );
456 456
 
457 457
 		$data_source_required_caps = array(
458 458
 			'gravityforms_edit_forms',
@@ -463,14 +463,14 @@  discard block
 block discarded – undo
463 463
 			'gravityforms_preview_forms',
464 464
 		);
465 465
 
466
-		if( GVCommon::has_cap( $data_source_required_caps ) ) {
467
-			$columns['gv_connected_form'] = __( 'Data Source', 'gravityview' );
466
+		if ( GVCommon::has_cap( $data_source_required_caps ) ) {
467
+			$columns[ 'gv_connected_form' ] = __( 'Data Source', 'gravityview' );
468 468
 		}
469 469
 
470
-		$columns['gv_template'] = _x( 'Template', 'Column title that shows what template is being used for Views', 'gravityview' );
470
+		$columns[ 'gv_template' ] = _x( 'Template', 'Column title that shows what template is being used for Views', 'gravityview' );
471 471
 
472 472
 		// Add the date back in.
473
-		$columns['date'] = $date;
473
+		$columns[ 'date' ] = $date;
474 474
 
475 475
 		return $columns;
476 476
 	}
@@ -484,12 +484,12 @@  discard block
 block discarded – undo
484 484
 	 */
485 485
 	function save_postdata( $post_id ) {
486 486
 
487
-		if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ){
487
+		if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
488 488
 			return;
489 489
 		}
490 490
 
491 491
 		// validate post_type
492
-		if ( ! isset( $_POST['post_type'] ) || 'gravityview' != $_POST['post_type'] ) {
492
+		if ( ! isset( $_POST[ 'post_type' ] ) || 'gravityview' != $_POST[ 'post_type' ] ) {
493 493
 			return;
494 494
 		}
495 495
 
@@ -504,64 +504,64 @@  discard block
 block discarded – undo
504 504
 		$statii = array();
505 505
 
506 506
 		// check if this is a start fresh View
507
-		if ( isset( $_POST['gravityview_select_form_nonce'] ) && wp_verify_nonce( $_POST['gravityview_select_form_nonce'], 'gravityview_select_form' ) ) {
507
+		if ( isset( $_POST[ 'gravityview_select_form_nonce' ] ) && wp_verify_nonce( $_POST[ 'gravityview_select_form_nonce' ], 'gravityview_select_form' ) ) {
508 508
 
509
-			$form_id = !empty( $_POST['gravityview_form_id'] ) ? $_POST['gravityview_form_id'] : '';
509
+			$form_id = ! empty( $_POST[ 'gravityview_form_id' ] ) ? $_POST[ 'gravityview_form_id' ] : '';
510 510
 			// save form id
511
-			$statii['form_id'] = update_post_meta( $post_id, '_gravityview_form_id', $form_id );
511
+			$statii[ 'form_id' ] = update_post_meta( $post_id, '_gravityview_form_id', $form_id );
512 512
 
513 513
 		}
514 514
 
515
-		if( false === GVCommon::has_cap( 'gravityforms_create_form' ) && empty( $statii['form_id'] ) ) {
515
+		if ( false === GVCommon::has_cap( 'gravityforms_create_form' ) && empty( $statii[ 'form_id' ] ) ) {
516 516
 			gravityview()->log->error( 'Current user does not have the capability to create a new Form.', array( 'data' => wp_get_current_user() ) );
517 517
 			return;
518 518
 		}
519 519
 
520 520
 		// Was this a start fresh?
521
-		if ( ! empty( $_POST['gravityview_form_id_start_fresh'] ) ) {
522
-			$statii['start_fresh'] = add_post_meta( $post_id, '_gravityview_start_fresh', 1 );
521
+		if ( ! empty( $_POST[ 'gravityview_form_id_start_fresh' ] ) ) {
522
+			$statii[ 'start_fresh' ] = add_post_meta( $post_id, '_gravityview_start_fresh', 1 );
523 523
 		} else {
524
-			$statii['start_fresh'] = delete_post_meta( $post_id, '_gravityview_start_fresh' );
524
+			$statii[ 'start_fresh' ] = delete_post_meta( $post_id, '_gravityview_start_fresh' );
525 525
 		}
526 526
 
527 527
 		// Check if we have a template id
528
-		if ( isset( $_POST['gravityview_select_template_nonce'] ) && wp_verify_nonce( $_POST['gravityview_select_template_nonce'], 'gravityview_select_template' ) ) {
528
+		if ( isset( $_POST[ 'gravityview_select_template_nonce' ] ) && wp_verify_nonce( $_POST[ 'gravityview_select_template_nonce' ], 'gravityview_select_template' ) ) {
529 529
 
530
-			$template_id = !empty( $_POST['gravityview_directory_template'] ) ? $_POST['gravityview_directory_template'] : '';
530
+			$template_id = ! empty( $_POST[ 'gravityview_directory_template' ] ) ? $_POST[ 'gravityview_directory_template' ] : '';
531 531
 
532 532
 			// now save template id
533
-			$statii['directory_template'] = update_post_meta( $post_id, '_gravityview_directory_template', $template_id );
533
+			$statii[ 'directory_template' ] = update_post_meta( $post_id, '_gravityview_directory_template', $template_id );
534 534
 		}
535 535
 
536 536
 
537 537
 		// save View Configuration metabox
538
-		if ( isset( $_POST['gravityview_view_configuration_nonce'] ) && wp_verify_nonce( $_POST['gravityview_view_configuration_nonce'], 'gravityview_view_configuration' ) ) {
538
+		if ( isset( $_POST[ 'gravityview_view_configuration_nonce' ] ) && wp_verify_nonce( $_POST[ 'gravityview_view_configuration_nonce' ], 'gravityview_view_configuration' ) ) {
539 539
 
540 540
 			// template settings
541
-			if( empty( $_POST['template_settings'] ) ) {
542
-				$_POST['template_settings'] = array();
541
+			if ( empty( $_POST[ 'template_settings' ] ) ) {
542
+				$_POST[ 'template_settings' ] = array();
543 543
 			}
544
-			$statii['template_settings'] = update_post_meta( $post_id, '_gravityview_template_settings', $_POST['template_settings'] );
544
+			$statii[ 'template_settings' ] = update_post_meta( $post_id, '_gravityview_template_settings', $_POST[ 'template_settings' ] );
545 545
 
546 546
 			$fields = array();
547 547
 
548 548
 			// Directory&single Visible Fields
549
-			if( !empty( $preset_fields ) ) {
549
+			if ( ! empty( $preset_fields ) ) {
550 550
 
551 551
 				$fields = $preset_fields;
552 552
 
553
-			} elseif( !empty( $_POST['gv_fields'] ) ) {
553
+			} elseif ( ! empty( $_POST[ 'gv_fields' ] ) ) {
554 554
 				$fields = _gravityview_process_posted_fields();
555 555
 			}
556 556
 
557 557
 			$fields = map_deep( $fields, 'addslashes' );
558
-			$statii['directory_fields'] = update_post_meta( $post_id, '_gravityview_directory_fields', $fields );
558
+			$statii[ 'directory_fields' ] = update_post_meta( $post_id, '_gravityview_directory_fields', $fields );
559 559
 
560 560
 			// Directory Visible Widgets
561
-			if( empty( $_POST['widgets'] ) ) {
562
-				$_POST['widgets'] = array();
561
+			if ( empty( $_POST[ 'widgets' ] ) ) {
562
+				$_POST[ 'widgets' ] = array();
563 563
 			}
564
-			$statii['directory_widgets'] = gravityview_set_directory_widgets( $post_id, $_POST['widgets'] );
564
+			$statii[ 'directory_widgets' ] = gravityview_set_directory_widgets( $post_id, $_POST[ 'widgets' ] );
565 565
 
566 566
 		} // end save view configuration
567 567
 
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
 		 * @param array $statii Array of statuses of the post meta saving processes. If saving worked, each key should be mapped to a value of the post ID (`directory_widgets` => `124`). If failed (or didn't change), the value will be false.
572 572
 		 * @since 1.17.2
573 573
 		 */
574
-		do_action('gravityview_view_saved', $post_id, $statii );
574
+		do_action( 'gravityview_view_saved', $post_id, $statii );
575 575
 
576 576
 		gravityview()->log->debug( '[save_postdata] Update Post Meta Statuses (also returns false if nothing changed)', array( 'data' => array_map( 'intval', $statii ) ) );
577 577
 	}
@@ -614,20 +614,20 @@  discard block
 block discarded – undo
614 614
 		$fields = $this->get_available_fields( $form, $context );
615 615
 
616 616
 		$output = '';
617
-		if( !empty( $fields ) ) {
617
+		if ( ! empty( $fields ) ) {
618 618
 
619
-			foreach( $fields as $id => $details ) {
619
+			foreach ( $fields as $id => $details ) {
620 620
 
621
-				if( in_array( $details['type'], (array) $blacklist_field_types ) ) {
621
+				if ( in_array( $details[ 'type' ], (array)$blacklist_field_types ) ) {
622 622
 					continue;
623 623
 				}
624 624
 
625 625
 				// Edit mode only allows editing the parent fields, not single inputs.
626
-				if( $context === 'edit' && !empty( $details['parent'] ) ) {
626
+				if ( $context === 'edit' && ! empty( $details[ 'parent' ] ) ) {
627 627
 					continue;
628 628
 				}
629 629
 
630
-				$output .= new GravityView_Admin_View_Field( $details['label'], $id, $details, $settings = array(), $form );
630
+				$output .= new GravityView_Admin_View_Field( $details[ 'label' ], $id, $details, $settings = array(), $form );
631 631
 
632 632
 			} // End foreach
633 633
 		}
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
 		echo $output;
636 636
 
637 637
 		// For the EDIT view we only want to allow the form fields.
638
-		if( $context === 'edit' ) {
638
+		if ( $context === 'edit' ) {
639 639
 			return;
640 640
 		}
641 641
 
@@ -659,16 +659,16 @@  discard block
 block discarded – undo
659 659
 		$additional_fields = apply_filters( 'gravityview_additional_fields', array(
660 660
 			array(
661 661
 				'label_text' => __( '+ Add All Fields', 'gravityview' ),
662
-				'desc' => __('Add all the available fields at once.', 'gravityview'),
662
+				'desc' => __( 'Add all the available fields at once.', 'gravityview' ),
663 663
 				'field_id' => 'all-fields',
664 664
 				'label_type' => 'field',
665 665
 				'input_type' => NULL,
666 666
 				'field_options' => NULL,
667 667
 				'settings_html'	=> NULL,
668 668
 			)
669
-		));
669
+		) );
670 670
 
671
-		if( !empty( $additional_fields )) {
671
+		if ( ! empty( $additional_fields ) ) {
672 672
 			foreach ( (array)$additional_fields as $item ) {
673 673
 
674 674
 				// Prevent items from not having index set
@@ -679,16 +679,16 @@  discard block
 block discarded – undo
679 679
 					'input_type' => NULL,
680 680
 					'field_options' => NULL,
681 681
 					'settings_html'	=> NULL,
682
-				));
682
+				) );
683 683
 
684 684
 				// Backward compat.
685
-				if( !empty( $item['field_options'] ) ) {
685
+				if ( ! empty( $item[ 'field_options' ] ) ) {
686 686
 					// Use settings_html from now on.
687
-					$item['settings_html'] = $item['field_options'];
687
+					$item[ 'settings_html' ] = $item[ 'field_options' ];
688 688
 				}
689 689
 
690 690
 				// Render a label for each of them
691
-				echo new GravityView_Admin_View_Field( $item['label_text'], $item['field_id'], $item, $settings = array(), $form );
691
+				echo new GravityView_Admin_View_Field( $item[ 'label_text' ], $item[ 'field_id' ], $item, $settings = array(), $form );
692 692
 
693 693
 			}
694 694
 		}
@@ -701,54 +701,54 @@  discard block
 block discarded – undo
701 701
 	 * @param  string $zone   Either 'single', 'directory', 'header', 'footer'
702 702
 	 * @return array
703 703
 	 */
704
-	function get_entry_default_fields($form, $zone) {
704
+	function get_entry_default_fields( $form, $zone ) {
705 705
 
706 706
 		$entry_default_fields = array();
707 707
 
708
-		if( in_array( $zone, array( 'directory', 'single' ) ) ) {
708
+		if ( in_array( $zone, array( 'directory', 'single' ) ) ) {
709 709
 
710 710
 			$entry_default_fields = array(
711 711
 				'id' => array(
712
-					'label' => __('Entry ID', 'gravityview'),
712
+					'label' => __( 'Entry ID', 'gravityview' ),
713 713
 					'type' => 'id',
714
-					'desc'	=> __('The unique ID of the entry.', 'gravityview'),
714
+					'desc'	=> __( 'The unique ID of the entry.', 'gravityview' ),
715 715
 				),
716 716
 				'date_created' => array(
717
-					'label' => __('Entry Date', 'gravityview'),
718
-					'desc'	=> __('The date the entry was created.', 'gravityview'),
717
+					'label' => __( 'Entry Date', 'gravityview' ),
718
+					'desc'	=> __( 'The date the entry was created.', 'gravityview' ),
719 719
 					'type' => 'date_created',
720 720
 				),
721 721
 				'source_url' => array(
722
-					'label' => __('Source URL', 'gravityview'),
722
+					'label' => __( 'Source URL', 'gravityview' ),
723 723
 					'type' => 'source_url',
724
-					'desc'	=> __('The URL of the page where the form was submitted.', 'gravityview'),
724
+					'desc'	=> __( 'The URL of the page where the form was submitted.', 'gravityview' ),
725 725
 				),
726 726
 				'ip' => array(
727
-					'label' => __('User IP', 'gravityview'),
727
+					'label' => __( 'User IP', 'gravityview' ),
728 728
 					'type' => 'ip',
729
-					'desc'	=> __('The IP Address of the user who created the entry.', 'gravityview'),
729
+					'desc'	=> __( 'The IP Address of the user who created the entry.', 'gravityview' ),
730 730
 				),
731 731
 				'created_by' => array(
732
-					'label' => __('User', 'gravityview'),
732
+					'label' => __( 'User', 'gravityview' ),
733 733
 					'type' => 'created_by',
734
-					'desc'	=> __('Details of the logged-in user who created the entry (if any).', 'gravityview'),
734
+					'desc'	=> __( 'Details of the logged-in user who created the entry (if any).', 'gravityview' ),
735 735
 				),
736 736
 
737 737
 				/**
738 738
 				 * @since 1.7.2
739 739
 				 */
740 740
 			    'other_entries' => array(
741
-				    'label'	=> __('Other Entries', 'gravityview'),
741
+				    'label'	=> __( 'Other Entries', 'gravityview' ),
742 742
 				    'type'	=> 'other_entries',
743
-				    'desc'	=> __('Display other entries created by the entry creator.', 'gravityview'),
743
+				    'desc'	=> __( 'Display other entries created by the entry creator.', 'gravityview' ),
744 744
 			    ),
745 745
 	        );
746 746
 
747
-			if( 'single' !== $zone) {
747
+			if ( 'single' !== $zone ) {
748 748
 
749
-				$entry_default_fields['entry_link'] = array(
750
-					'label' => __('Link to Entry', 'gravityview'),
751
-					'desc'	=> __('A dedicated link to the single entry with customizable text.', 'gravityview'),
749
+				$entry_default_fields[ 'entry_link' ] = array(
750
+					'label' => __( 'Link to Entry', 'gravityview' ),
751
+					'desc'	=> __( 'A dedicated link to the single entry with customizable text.', 'gravityview' ),
752 752
 					'type' => 'entry_link',
753 753
 				);
754 754
 			}
@@ -758,10 +758,10 @@  discard block
 block discarded – undo
758 758
 		/**
759 759
 		 * @since  1.2
760 760
 		 */
761
-		$entry_default_fields['custom']	= array(
762
-			'label'	=> __('Custom Content', 'gravityview'),
761
+		$entry_default_fields[ 'custom' ] = array(
762
+			'label'	=> __( 'Custom Content', 'gravityview' ),
763 763
 			'type'	=> 'custom',
764
-			'desc'	=> __('Insert custom text or HTML.', 'gravityview'),
764
+			'desc'	=> __( 'Insert custom text or HTML.', 'gravityview' ),
765 765
 		);
766 766
 
767 767
 		/**
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
 		 * @param  string|array $form form_ID or form object
771 771
 		 * @param  string $zone   Either 'single', 'directory', 'header', 'footer'
772 772
 		 */
773
-		return apply_filters( 'gravityview_entry_default_fields', $entry_default_fields, $form, $zone);
773
+		return apply_filters( 'gravityview_entry_default_fields', $entry_default_fields, $form, $zone );
774 774
 	}
775 775
 
776 776
 	/**
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
 	 */
782 782
 	function get_available_fields( $form = '', $zone = NULL ) {
783 783
 
784
-		if( empty( $form ) ) {
784
+		if ( empty( $form ) ) {
785 785
 			gravityview()->log->error( '$form is empty' );
786 786
 			return array();
787 787
 		}
@@ -790,7 +790,7 @@  discard block
 block discarded – undo
790 790
 		$fields = gravityview_get_form_fields( $form, true );
791 791
 
792 792
 		// get meta fields ( only if form was already created )
793
-		if( !is_array( $form ) ) {
793
+		if ( ! is_array( $form ) ) {
794 794
 			$meta_fields = gravityview_get_entry_meta( $form );
795 795
 		} else {
796 796
 			$meta_fields = array();
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
 		$fields = $fields + $meta_fields + $default_fields;
804 804
 
805 805
 		// Move Custom Content to top
806
-		$fields = array( 'custom' => $fields['custom'] ) + $fields;
806
+		$fields = array( 'custom' => $fields[ 'custom' ] ) + $fields;
807 807
 
808 808
 		return $fields;
809 809
 	}
@@ -817,11 +817,11 @@  discard block
 block discarded – undo
817 817
 
818 818
 		$widgets = $this->get_registered_widgets();
819 819
 
820
-		if( !empty( $widgets ) ) {
820
+		if ( ! empty( $widgets ) ) {
821 821
 
822
-			foreach( $widgets as $id => $details ) {
822
+			foreach ( $widgets as $id => $details ) {
823 823
 
824
-				echo new GravityView_Admin_View_Widget( $details['label'], $id, $details );
824
+				echo new GravityView_Admin_View_Widget( $details[ 'label' ], $id, $details );
825 825
 
826 826
 			}
827 827
 		}
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
 	function render_active_areas( $template_id, $type, $zone, $rows, $values ) {
851 851
 		global $post;
852 852
 
853
-		if( $type === 'widget' ) {
853
+		if ( $type === 'widget' ) {
854 854
 			$button_label = __( 'Add Widget', 'gravityview' );
855 855
 		} else {
856 856
 			$button_label = __( 'Add Field', 'gravityview' );
@@ -862,10 +862,10 @@  discard block
 block discarded – undo
862 862
 		$form_id = null;
863 863
 
864 864
 		// if saved values, get available fields to label everyone
865
-		if( !empty( $values ) && ( !empty( $post->ID ) || !empty( $_POST['template_id'] ) ) ) {
865
+		if ( ! empty( $values ) && ( ! empty( $post->ID ) || ! empty( $_POST[ 'template_id' ] ) ) ) {
866 866
 
867
-			if( !empty( $_POST['template_id'] ) ) {
868
-				$form = GravityView_Ajax::pre_get_form_fields( $_POST['template_id'] );
867
+			if ( ! empty( $_POST[ 'template_id' ] ) ) {
868
+				$form = GravityView_Ajax::pre_get_form_fields( $_POST[ 'template_id' ] );
869 869
 			} else {
870 870
 				$form_id = $form = gravityview_get_form_id( $post->ID );
871 871
 			}
@@ -882,44 +882,44 @@  discard block
 block discarded – undo
882 882
 				$available_items[ $form ] = $this->get_registered_widgets();
883 883
 			}
884 884
 		}
885
-		foreach( $rows as $row ) :
886
-			foreach( $row as $col => $areas ) :
887
-				$column = ($col == '2-2') ? '1-2' : $col; ?>
885
+		foreach ( $rows as $row ) :
886
+			foreach ( $row as $col => $areas ) :
887
+				$column = ( $col == '2-2' ) ? '1-2' : $col; ?>
888 888
 
889 889
 				<div class="gv-grid-col-<?php echo esc_attr( $column ); ?>">
890 890
 
891
-					<?php foreach( $areas as $area ) : 	?>
891
+					<?php foreach ( $areas as $area ) : 	?>
892 892
 
893
-						<div class="gv-droppable-area" data-areaid="<?php echo esc_attr( $zone .'_'. $area['areaid'] ); ?>" data-context="<?php echo esc_attr( $zone ); ?>">
894
-							<div class="active-drop active-drop-<?php echo esc_attr( $type ); ?>" data-areaid="<?php echo esc_attr( $zone .'_'. $area['areaid'] ); ?>">
893
+						<div class="gv-droppable-area" data-areaid="<?php echo esc_attr( $zone . '_' . $area[ 'areaid' ] ); ?>" data-context="<?php echo esc_attr( $zone ); ?>">
894
+							<div class="active-drop active-drop-<?php echo esc_attr( $type ); ?>" data-areaid="<?php echo esc_attr( $zone . '_' . $area[ 'areaid' ] ); ?>">
895 895
 
896 896
 								<?php // render saved fields
897 897
 
898
-								if( ! empty( $values[ $zone .'_'. $area['areaid'] ] ) ) {
898
+								if ( ! empty( $values[ $zone . '_' . $area[ 'areaid' ] ] ) ) {
899 899
 
900
-									foreach( $values[ $zone .'_'. $area['areaid'] ] as $uniqid => $field ) {
900
+									foreach ( $values[ $zone . '_' . $area[ 'areaid' ] ] as $uniqid => $field ) {
901 901
 
902 902
 										// Maybe has a form ID
903
-										$form_id = empty( $field['form_id'] ) ? $form_id : $field['form_id'];
903
+										$form_id = empty( $field[ 'form_id' ] ) ? $form_id : $field[ 'form_id' ];
904 904
 
905 905
 										$input_type = NULL;
906 906
 
907 907
 										if ( $form_id ) {
908
-											$original_item = isset( $available_items[ $form_id ] [ $field['id'] ] ) ? $available_items[ $form_id ] [ $field['id'] ] : false ;
908
+											$original_item = isset( $available_items[ $form_id ] [ $field[ 'id' ] ] ) ? $available_items[ $form_id ] [ $field[ 'id' ] ] : false;
909 909
                                         } else {
910
-											$original_item = isset( $available_items[ $field['id'] ] ) ? $available_items[ $field['id'] ] : false ;
910
+											$original_item = isset( $available_items[ $field[ 'id' ] ] ) ? $available_items[ $field[ 'id' ] ] : false;
911 911
                                         }
912 912
 
913
-										if ( !$original_item ) {
914
-											gravityview()->log->error( 'An item was not available when rendering the output; maybe it was added by a plugin that is now de-activated.', array(' data' => array('available_items' => $available_items, 'field' => $field ) ) );
913
+										if ( ! $original_item ) {
914
+											gravityview()->log->error( 'An item was not available when rendering the output; maybe it was added by a plugin that is now de-activated.', array( ' data' => array( 'available_items' => $available_items, 'field' => $field ) ) );
915 915
 
916 916
 											$original_item = $field;
917 917
 										} else {
918
-											$input_type = isset( $original_item['type'] ) ? $original_item['type'] : NULL;
918
+											$input_type = isset( $original_item[ 'type' ] ) ? $original_item[ 'type' ] : NULL;
919 919
 										}
920 920
 
921 921
 										// Field options dialog box
922
-										$field_options = GravityView_Render_Settings::render_field_and_widget_options( $type, $field['id'], $input_type, $zone, $template_id, $field );
922
+										$field_options = GravityView_Render_Settings::render_field_and_widget_options( $type, $field[ 'id' ], $input_type, $zone, $template_id, $field );
923 923
 
924 924
 										$item = array(
925 925
 											'input_type' => $input_type,
@@ -932,23 +932,23 @@  discard block
 block discarded – undo
932 932
 											$item = wp_parse_args( $item, $original_item );
933 933
 										}
934 934
 
935
-										switch( $type ) {
935
+										switch ( $type ) {
936 936
 											case 'widget':
937
-												echo new GravityView_Admin_View_Widget( $item['label'], $field['id'], $item, $field );
937
+												echo new GravityView_Admin_View_Widget( $item[ 'label' ], $field[ 'id' ], $item, $field );
938 938
 												break;
939 939
 											default:
940
-												echo new GravityView_Admin_View_Field( $field['label'], $field['id'], $item, $field, $form_id );
940
+												echo new GravityView_Admin_View_Field( $field[ 'label' ], $field[ 'id' ], $item, $field, $form_id );
941 941
 										}
942 942
 									}
943 943
 
944 944
 								} // End if zone is not empty ?>
945 945
 
946
-								<span class="drop-message"><?php echo sprintf(esc_attr__('"+ %s" or drag existing %ss here.', 'gravityview'), $button_label, $type ); ?></span>
946
+								<span class="drop-message"><?php echo sprintf( esc_attr__( '"+ %s" or drag existing %ss here.', 'gravityview' ), $button_label, $type ); ?></span>
947 947
 							</div>
948 948
 							<div class="gv-droppable-area-action">
949
-								<a href="#" class="gv-add-field button-secondary" title="" data-objecttype="<?php echo esc_attr( $type ); ?>" data-areaid="<?php echo esc_attr( $zone .'_'. $area['areaid'] ); ?>" data-context="<?php echo esc_attr( $zone ); ?>" data-formid="<?php echo $view ? esc_attr( $view->form ? $view->form->ID : '' ) : ''; ?>"><?php echo '+ '.esc_html( $button_label ); ?></a>
949
+								<a href="#" class="gv-add-field button-secondary" title="" data-objecttype="<?php echo esc_attr( $type ); ?>" data-areaid="<?php echo esc_attr( $zone . '_' . $area[ 'areaid' ] ); ?>" data-context="<?php echo esc_attr( $zone ); ?>" data-formid="<?php echo $view ? esc_attr( $view->form ? $view->form->ID : '' ) : ''; ?>"><?php echo '+ ' . esc_html( $button_label ); ?></a>
950 950
 
951
-								<p class="gv-droppable-area-title"><strong><?php echo esc_html( $area['title'] ); ?></strong><?php if( !empty( $area['subtitle'] ) ) { ?><span class="gv-droppable-area-subtitle"> &ndash; <?php echo esc_html( $area['subtitle'] ); ?></span><?php } ?></p>
951
+								<p class="gv-droppable-area-title"><strong><?php echo esc_html( $area[ 'title' ] ); ?></strong><?php if ( ! empty( $area[ 'subtitle' ] ) ) { ?><span class="gv-droppable-area-subtitle"> &ndash; <?php echo esc_html( $area[ 'subtitle' ] ); ?></span><?php } ?></p>
952 952
 							</div>
953 953
 						</div>
954 954
 
@@ -970,7 +970,7 @@  discard block
 block discarded – undo
970 970
 		$default_widget_areas = GravityView_Widget::get_default_widget_areas();
971 971
 
972 972
 		$widgets = array();
973
-		if( !empty( $post_id ) ) {
973
+		if ( ! empty( $post_id ) ) {
974 974
 			$widgets = gravityview_get_directory_widgets( $post_id );
975 975
 		}
976 976
 
@@ -1009,8 +1009,8 @@  discard block
 block discarded – undo
1009 1009
 		$forms = gravityview_get_forms( 'any' );
1010 1010
 
1011 1011
 		foreach ( $forms as $form ) {
1012
-			foreach ( $form['fields'] as $field ) {
1013
-				$fields[] = $field['type'];
1012
+			foreach ( $form[ 'fields' ] as $field ) {
1013
+				$fields[ ] = $field[ 'type' ];
1014 1014
 			}
1015 1015
 		}
1016 1016
 
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
 		// list of available fields to be shown in the popup
1052 1052
 		$forms = gravityview_get_forms( 'any' );
1053 1053
 
1054
-		$form_ids = array_map( function ($form) { return $form['id']; }, $forms);
1054
+		$form_ids = array_map( function( $form ) { return $form[ 'id' ]; }, $forms );
1055 1055
 
1056 1056
 		foreach ( $form_ids as $form_id ) {
1057 1057
 			$filter_field_id = sprintf( 'gv-field-filter-%s-%d', $context, $form_id );
@@ -1064,7 +1064,7 @@  discard block
 block discarded – undo
1064 1064
                 </div>
1065 1065
 
1066 1066
                 <div id="available-fields-<?php echo $filter_field_id; ?>" aria-live="polite" role="listbox">
1067
-                <?php do_action('gravityview_render_available_fields', $form_id, $context ); ?>
1067
+                <?php do_action( 'gravityview_render_available_fields', $form_id, $context ); ?>
1068 1068
                 </div>
1069 1069
 
1070 1070
                 <div class="gv-no-results hidden description"><?php esc_html_e( 'No fields were found matching the search.', 'gravityview' ); ?></div>
@@ -1083,7 +1083,7 @@  discard block
 block discarded – undo
1083 1083
 	 * @return string HTML of the active areas
1084 1084
 	 */
1085 1085
 	function render_directory_active_areas( $template_id = '', $context = 'single', $post_id = '', $echo = false ) {
1086
-		if( empty( $template_id ) ) {
1086
+		if ( empty( $template_id ) ) {
1087 1087
 			gravityview()->log->debug( '[render_directory_active_areas] {template_id} is empty', array( 'template_id' => $template_id ) );
1088 1088
 			return '';
1089 1089
 		}
@@ -1097,12 +1097,12 @@  discard block
 block discarded – undo
1097 1097
 		 */
1098 1098
 		$template_areas = apply_filters( 'gravityview_template_active_areas', array(), $template_id, $context );
1099 1099
 
1100
-		if( empty( $template_areas ) ) {
1100
+		if ( empty( $template_areas ) ) {
1101 1101
 
1102 1102
 			gravityview()->log->debug( '[render_directory_active_areas] No areas defined. Maybe template {template_id} is disabled.', array( 'data' => $template_id ) );
1103 1103
 			$output = '<div>';
1104
-			$output .= '<h2 class="description" style="font-size: 16px; margin:0">'. sprintf( esc_html__( 'This View is configured using the %s View type, which is disabled.', 'gravityview' ), '<em>'.$template_id.'</em>' ) .'</h2>';
1105
-			$output .= '<p class="description" style="font-size: 14px; margin:0 0 1em 0;padding:0">'.esc_html__('The data is not lost; re-activate the associated plugin and the configuration will re-appear.', 'gravityview').'</p>';
1104
+			$output .= '<h2 class="description" style="font-size: 16px; margin:0">' . sprintf( esc_html__( 'This View is configured using the %s View type, which is disabled.', 'gravityview' ), '<em>' . $template_id . '</em>' ) . '</h2>';
1105
+			$output .= '<p class="description" style="font-size: 14px; margin:0 0 1em 0;padding:0">' . esc_html__( 'The data is not lost; re-activate the associated plugin and the configuration will re-appear.', 'gravityview' ) . '</p>';
1106 1106
 			$output .= '</div>';
1107 1107
 		} else {
1108 1108
 
@@ -1117,7 +1117,7 @@  discard block
 block discarded – undo
1117 1117
 
1118 1118
 		}
1119 1119
 
1120
-		if( $echo ) {
1120
+		if ( $echo ) {
1121 1121
 			echo $output;
1122 1122
 		}
1123 1123
 
@@ -1137,26 +1137,26 @@  discard block
 block discarded – undo
1137 1137
 		$is_widgets_page = ( $pagenow === 'widgets.php' );
1138 1138
 
1139 1139
 		// Add the GV font (with the Astronaut)
1140
-		wp_enqueue_style( 'gravityview_global', plugins_url('assets/css/admin-global.css', GRAVITYVIEW_FILE), array(), GravityView_Plugin::version );
1140
+		wp_enqueue_style( 'gravityview_global', plugins_url( 'assets/css/admin-global.css', GRAVITYVIEW_FILE ), array(), GravityView_Plugin::version );
1141 1141
 
1142
-		wp_register_script( 'gravityview-jquery-cookie', plugins_url('assets/lib/jquery.cookie/jquery.cookie.min.js', GRAVITYVIEW_FILE), array( 'jquery' ), GravityView_Plugin::version, true );
1142
+		wp_register_script( 'gravityview-jquery-cookie', plugins_url( 'assets/lib/jquery.cookie/jquery.cookie.min.js', GRAVITYVIEW_FILE ), array( 'jquery' ), GravityView_Plugin::version, true );
1143 1143
 
1144 1144
 		// Don't process any scripts below here if it's not a GravityView page.
1145
-		if( ! gravityview_is_admin_page( $hook, 'single' ) && ! $is_widgets_page ) {
1145
+		if ( ! gravityview_is_admin_page( $hook, 'single' ) && ! $is_widgets_page ) {
1146 1146
 		    return;
1147 1147
 		}
1148 1148
 
1149 1149
         wp_enqueue_script( 'jquery-ui-datepicker' );
1150
-        wp_enqueue_style( 'gravityview_views_datepicker', plugins_url('assets/css/admin-datepicker.css', GRAVITYVIEW_FILE), GravityView_Plugin::version );
1150
+        wp_enqueue_style( 'gravityview_views_datepicker', plugins_url( 'assets/css/admin-datepicker.css', GRAVITYVIEW_FILE ), GravityView_Plugin::version );
1151 1151
 
1152
-        $script_debug = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min';
1152
+        $script_debug = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
1153 1153
 
1154 1154
         //enqueue scripts
1155 1155
         wp_enqueue_script( 'gravityview_views_scripts', plugins_url( 'assets/js/admin-views' . $script_debug . '.js', GRAVITYVIEW_FILE ), array( 'jquery-ui-tabs', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-ui-tooltip', 'jquery-ui-dialog', 'gravityview-jquery-cookie', 'jquery-ui-datepicker', 'underscore' ), GravityView_Plugin::version );
1156 1156
 
1157
-        wp_localize_script('gravityview_views_scripts', 'gvGlobals', array(
1157
+        wp_localize_script( 'gravityview_views_scripts', 'gvGlobals', array(
1158 1158
             'cookiepath' => COOKIEPATH,
1159
-            'passed_form_id' => (bool) \GV\Utils::_GET( 'form_id' ),
1159
+            'passed_form_id' => (bool)\GV\Utils::_GET( 'form_id' ),
1160 1160
             'nonce' => wp_create_nonce( 'gravityview_ajaxviews' ),
1161 1161
             'label_viewname' => __( 'Enter View name here', 'gravityview' ),
1162 1162
             'label_close' => __( 'Close', 'gravityview' ),
@@ -1168,9 +1168,9 @@  discard block
 block discarded – undo
1168 1168
             'loading_error' => esc_html__( 'There was an error loading dynamic content.', 'gravityview' ),
1169 1169
             'field_loaderror' => __( 'Error while adding the field. Please try again or contact GravityView support.', 'gravityview' ),
1170 1170
             'remove_all_fields' => __( 'Would you like to remove all fields in this zone? (You are seeing this message because you were holding down the ALT key)', 'gravityview' ),
1171
-        ));
1171
+        ) );
1172 1172
 
1173
-        wp_enqueue_style( 'gravityview_views_styles', plugins_url( 'assets/css/admin-views.css', GRAVITYVIEW_FILE ), array('dashicons', 'wp-jquery-ui-dialog' ), GravityView_Plugin::version );
1173
+        wp_enqueue_style( 'gravityview_views_styles', plugins_url( 'assets/css/admin-views.css', GRAVITYVIEW_FILE ), array( 'dashicons', 'wp-jquery-ui-dialog' ), GravityView_Plugin::version );
1174 1174
 
1175 1175
         // Enqueue scripts needed for merge tags
1176 1176
         self::enqueue_gravity_forms_scripts();
@@ -1195,7 +1195,7 @@  discard block
 block discarded – undo
1195 1195
 		);
1196 1196
 
1197 1197
 		if ( wp_is_mobile() ) {
1198
-		    $scripts[] = 'jquery-touch-punch';
1198
+		    $scripts[ ] = 'jquery-touch-punch';
1199 1199
 		}
1200 1200
 
1201 1201
 		wp_enqueue_script( $scripts );
Please login to merge, or discard this patch.
includes/admin/class.render.settings.php 1 patch
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 		$field_options = array();
29 29
 
30
-		if( 'field' === $field_type ) {
30
+		if ( 'field' === $field_type ) {
31 31
 
32 32
 			// Default options - fields
33 33
 			$field_options = array(
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 				'custom_class' => array(
46 46
 					'type' => 'text',
47 47
 					'label' => __( 'Custom CSS Class:', 'gravityview' ),
48
-					'desc' => __( 'This class will be added to the field container', 'gravityview'),
48
+					'desc' => __( 'This class will be added to the field container', 'gravityview' ),
49 49
 					'value' => '',
50 50
 					'merge_tags' => true,
51 51
 					'tooltip' => 'gv_css_merge_tags',
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
 			);
66 66
 
67 67
 			// Match Table as well as DataTables
68
-			if( preg_match( '/table/ism', $template_id ) && 'directory' === $context ) {
69
-				$field_options['width'] = array(
68
+			if ( preg_match( '/table/ism', $template_id ) && 'directory' === $context ) {
69
+				$field_options[ 'width' ] = array(
70 70
 					'type' => 'number',
71
-					'label' => __('Percent Width', 'gravityview'),
72
-					'desc' => __( 'Leave blank for column width to be based on the field content.', 'gravityview'),
71
+					'label' => __( 'Percent Width', 'gravityview' ),
72
+					'desc' => __( 'Leave blank for column width to be based on the field content.', 'gravityview' ),
73 73
 					'class' => 'code widefat',
74 74
 					'value' => '',
75 75
 				);
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
 			'manage_options' => __( 'Administrator', 'gravityview' ),
123 123
 		);
124 124
 
125
-		if( is_multisite() ) {
126
-			$select_cap_choices['manage_network'] = __('Multisite Super Admin', 'gravityview' );
125
+		if ( is_multisite() ) {
126
+			$select_cap_choices[ 'manage_network' ] = __( 'Multisite Super Admin', 'gravityview' );
127 127
 		}
128 128
 
129 129
 		/**
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 		 * @param  string $context     Optional. What context are we in? Example: `single` or `directory`
137 137
 		 * @param  string $input_type  Optional. (textarea, list, select, etc.)
138 138
 		 */
139
-		$select_cap_choices = apply_filters('gravityview_field_visibility_caps', $select_cap_choices, $template_id, $field_id, $context, $input_type );
139
+		$select_cap_choices = apply_filters( 'gravityview_field_visibility_caps', $select_cap_choices, $template_id, $field_id, $context, $input_type );
140 140
 
141 141
 		return $select_cap_choices;
142 142
 	}
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 				continue;
206 206
 			}
207 207
 
208
-			switch ( $option['type'] ) {
208
+			switch ( $option[ 'type' ] ) {
209 209
 				// Hide hidden fields
210 210
 				case 'hidden':
211 211
 					$output .= '<div class="gv-setting-container gv-setting-container-' . esc_attr( $key ) . ' screen-reader-text">' . $field_output . '</div>';
@@ -260,17 +260,17 @@  discard block
 block discarded – undo
260 260
 		 * @deprecated setting index 'default' was replaced by 'value'
261 261
 		 * @see GravityView_FieldType::get_field_defaults
262 262
 		 */
263
-		if( !empty( $option['default'] ) && empty( $option['value'] ) ) {
264
-			$option['value'] = $option['default'];
265
-			_deprecated_function( 'GravityView_FieldType::get_field_defaults', '1.1.7', '[value] instead of [default] when defining the setting '. $name .' details' );
263
+		if ( ! empty( $option[ 'default' ] ) && empty( $option[ 'value' ] ) ) {
264
+			$option[ 'value' ] = $option[ 'default' ];
265
+			_deprecated_function( 'GravityView_FieldType::get_field_defaults', '1.1.7', '[value] instead of [default] when defining the setting ' . $name . ' details' );
266 266
 		}
267 267
 
268 268
 		// prepare to render option field type
269
-		if( isset( $option['type'] ) ) {
269
+		if ( isset( $option[ 'type' ] ) ) {
270 270
 
271 271
 			$type_class = self::load_type_class( $option );
272 272
 
273
-			if( class_exists( $type_class ) ) {
273
+			if ( class_exists( $type_class ) ) {
274 274
 
275 275
 				/** @var GravityView_FieldType $render_type */
276 276
 				$render_type = new $type_class( $name, $option, $curr_value );
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 				 * @param[in,out] string $output field class name
288 288
 				 * @param[in] array $option  option field data
289 289
 				 */
290
-				$output = apply_filters( "gravityview/option/output/{$option['type']}" , $output, $option );
290
+				$output = apply_filters( "gravityview/option/output/{$option[ 'type' ]}", $output, $option );
291 291
 			}
292 292
 
293 293
 		} // isset option[type]
@@ -317,27 +317,27 @@  discard block
 block discarded – undo
317 317
 		 * @deprecated setting index 'name' was replaced by 'label'
318 318
 		 * @see GravityView_FieldType::get_field_defaults
319 319
 		 */
320
-		if( isset( $setting['name'] ) && empty( $setting['label'] ) ) {
321
-			$setting['label'] = $setting['name'];
322
-			_deprecated_function( 'GravityView_FieldType::get_field_defaults', '1.1.7', '[label] instead of [name] when defining the setting '. $key .' details' );
320
+		if ( isset( $setting[ 'name' ] ) && empty( $setting[ 'label' ] ) ) {
321
+			$setting[ 'label' ] = $setting[ 'name' ];
322
+			_deprecated_function( 'GravityView_FieldType::get_field_defaults', '1.1.7', '[label] instead of [name] when defining the setting ' . $key . ' details' );
323 323
 		}
324 324
 
325 325
 		$name = esc_attr( sprintf( $name, $key ) );
326
-		$setting['id'] = esc_attr( sprintf( $id, $key ) );
327
-		$setting['tooltip'] = 'gv_' . $key;
326
+		$setting[ 'id' ] = esc_attr( sprintf( $id, $key ) );
327
+		$setting[ 'tooltip' ] = 'gv_' . $key;
328 328
 
329 329
 		// Use default if current setting isn't set.
330
-		$curr_value = isset( $current_settings[ $key ] ) ? $current_settings[ $key ] : $setting['value'];
330
+		$curr_value = isset( $current_settings[ $key ] ) ? $current_settings[ $key ] : $setting[ 'value' ];
331 331
 
332 332
 		// default setting type = text
333
-		$setting['type'] = empty( $setting['type'] ) ? 'text' : $setting['type'];
333
+		$setting[ 'type' ] = empty( $setting[ 'type' ] ) ? 'text' : $setting[ 'type' ];
334 334
 
335 335
 		// merge tags
336
-		if( !isset( $setting['merge_tags'] ) ) {
337
-			if( $setting['type'] === 'text' ) {
338
-				$setting['merge_tags'] = true;
336
+		if ( ! isset( $setting[ 'merge_tags' ] ) ) {
337
+			if ( $setting[ 'type' ] === 'text' ) {
338
+				$setting[ 'merge_tags' ] = true;
339 339
 			} else {
340
-				$setting['merge_tags'] = false;
340
+				$setting[ 'merge_tags' ] = false;
341 341
 			}
342 342
 		}
343 343
 
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 
346 346
 		// render the setting
347 347
 		$type_class = self::load_type_class( $setting );
348
-		if( class_exists( $type_class ) ) {
348
+		if ( class_exists( $type_class ) ) {
349 349
 			/** @var GravityView_FieldType $render_type */
350 350
 			$render_type = new $type_class( $name, $setting, $curr_value );
351 351
 			ob_start();
@@ -354,21 +354,21 @@  discard block
 block discarded – undo
354 354
 		}
355 355
 
356 356
 		// Check if setting is specific for a template
357
-		if( !empty( $setting['show_in_template'] ) ) {
358
-			if( !is_array( $setting['show_in_template'] ) ) {
359
-				$setting['show_in_template'] = array( $setting['show_in_template'] );
357
+		if ( ! empty( $setting[ 'show_in_template' ] ) ) {
358
+			if ( ! is_array( $setting[ 'show_in_template' ] ) ) {
359
+				$setting[ 'show_in_template' ] = array( $setting[ 'show_in_template' ] );
360 360
 			}
361
-			$show_if = ' data-show-if="'. implode( ' ', $setting['show_in_template'] ).'"';
361
+			$show_if = ' data-show-if="' . implode( ' ', $setting[ 'show_in_template' ] ) . '"';
362 362
 		} else {
363 363
 			$show_if = '';
364 364
 		}
365 365
 
366
-		if( ! empty( $setting['requires'] ) ) {
367
-			$show_if .= sprintf( ' data-requires="%s"', $setting['requires'] );
366
+		if ( ! empty( $setting[ 'requires' ] ) ) {
367
+			$show_if .= sprintf( ' data-requires="%s"', $setting[ 'requires' ] );
368 368
 		}
369 369
 
370 370
 		// output
371
-		echo '<tr valign="top" '. $show_if .'>' . $output . '</tr>';
371
+		echo '<tr valign="top" ' . $show_if . '>' . $output . '</tr>';
372 372
 
373 373
 	}
374 374
 
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 	 */
381 381
 	public static function load_type_class( $field = NULL ) {
382 382
 
383
-		if( empty( $field['type'] ) ) {
383
+		if ( empty( $field[ 'type' ] ) ) {
384 384
 			return NULL;
385 385
 		}
386 386
 
@@ -389,19 +389,19 @@  discard block
 block discarded – undo
389 389
 		 * @param string $class_suffix  field class suffix; `GravityView_FieldType_{$class_suffix}`
390 390
 		 * @param array $field   field data
391 391
 		 */
392
-		$type_class = apply_filters( "gravityview/setting/class/{$field['type']}", 'GravityView_FieldType_' . $field['type'], $field );
392
+		$type_class = apply_filters( "gravityview/setting/class/{$field[ 'type' ]}", 'GravityView_FieldType_' . $field[ 'type' ], $field );
393 393
 
394
-		if( !class_exists( $type_class ) ) {
394
+		if ( ! class_exists( $type_class ) ) {
395 395
 
396 396
 			/**
397 397
 			 * @filter `gravityview/setting/class_file/{field_type}`
398 398
 			 * @param string  $field_type_include_path field class file path
399 399
 			 * @param array $field  field data
400 400
 			 */
401
-			$class_file = apply_filters( "gravityview/setting/class_file/{$field['type']}", GRAVITYVIEW_DIR . "includes/admin/field-types/type_{$field['type']}.php", $field );
401
+			$class_file = apply_filters( "gravityview/setting/class_file/{$field[ 'type' ]}", GRAVITYVIEW_DIR . "includes/admin/field-types/type_{$field[ 'type' ]}.php", $field );
402 402
 
403
-			if( $class_file ) {
404
-				if( file_exists( $class_file ) ) {
403
+			if ( $class_file ) {
404
+				if ( file_exists( $class_file ) ) {
405 405
 					require_once( $class_file );
406 406
 				}
407 407
 			}
@@ -426,8 +426,8 @@  discard block
 block discarded – undo
426 426
 
427 427
 		_deprecated_function( __METHOD__, '1.2', 'GravityView_FieldType_checkbox::render_input' );
428 428
 
429
-		$output  = '<input name="'. esc_attr( $name ) .'" type="hidden" value="0">';
430
-		$output .= '<input name="'. esc_attr( $name ) .'" id="'. esc_attr( $id ) .'" type="checkbox" value="1" '. checked( $current, '1', false ) .' >';
429
+		$output  = '<input name="' . esc_attr( $name ) . '" type="hidden" value="0">';
430
+		$output .= '<input name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" type="checkbox" value="1" ' . checked( $current, '1', false ) . ' >';
431 431
 
432 432
 		return $output;
433 433
 	}
@@ -447,22 +447,22 @@  discard block
 block discarded – undo
447 447
 		_deprecated_function( __METHOD__, '1.2', 'GravityView_FieldType_text::render_input' );
448 448
 
449 449
 		// Show the merge tags if the field is a list view
450
-		$is_list = ( preg_match( '/_list-/ism', $name ));
450
+		$is_list = ( preg_match( '/_list-/ism', $name ) );
451 451
 
452 452
 		// Or is a single entry view
453
-		$is_single = ( preg_match( '/single_/ism', $name ));
453
+		$is_single = ( preg_match( '/single_/ism', $name ) );
454 454
 		$show = ( $is_single || $is_list );
455 455
 
456 456
 		$class = '';
457 457
 		// and $add_merge_tags is not false
458
-		if( $show && $add_merge_tags !== false || $add_merge_tags === 'force' ) {
458
+		if ( $show && $add_merge_tags !== false || $add_merge_tags === 'force' ) {
459 459
 			$class = 'merge-tag-support mt-position-right mt-hide_all_fields ';
460 460
 		}
461 461
 
462
-		$class .= !empty( $args['class'] ) ? $args['class'] : 'widefat';
463
-		$type = !empty( $args['type'] ) ? $args['type'] : 'text';
462
+		$class .= ! empty( $args[ 'class' ] ) ? $args[ 'class' ] : 'widefat';
463
+		$type = ! empty( $args[ 'type' ] ) ? $args[ 'type' ] : 'text';
464 464
 
465
-		return '<input name="'. esc_attr( $name ) .'" id="'. esc_attr( $id ) .'" type="'.esc_attr($type).'" value="'. esc_attr( $current ) .'" class="'.esc_attr( $class ).'">';
465
+		return '<input name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" type="' . esc_attr( $type ) . '" value="' . esc_attr( $current ) . '" class="' . esc_attr( $class ) . '">';
466 466
 	}
467 467
 
468 468
 	/**
@@ -479,21 +479,21 @@  discard block
 block discarded – undo
479 479
 		_deprecated_function( __METHOD__, '1.2', 'GravityView_FieldType_textarea::render_input' );
480 480
 
481 481
 		// Show the merge tags if the field is a list view
482
-		$is_list = ( preg_match( '/_list-/ism', $name ));
482
+		$is_list = ( preg_match( '/_list-/ism', $name ) );
483 483
 
484 484
 		// Or is a single entry view
485
-		$is_single = ( preg_match( '/single_/ism', $name ));
485
+		$is_single = ( preg_match( '/single_/ism', $name ) );
486 486
 		$show = ( $is_single || $is_list );
487 487
 
488 488
 		$class = '';
489 489
 		// and $add_merge_tags is not false
490
-		if( $show && $add_merge_tags !== false || $add_merge_tags === 'force' ) {
490
+		if ( $show && $add_merge_tags !== false || $add_merge_tags === 'force' ) {
491 491
 			$class = 'merge-tag-support mt-position-right mt-hide_all_fields ';
492 492
 		}
493 493
 
494
-		$class .= !empty( $args['class'] ) ? 'widefat '.$args['class'] : 'widefat';
494
+		$class .= ! empty( $args[ 'class' ] ) ? 'widefat ' . $args[ 'class' ] : 'widefat';
495 495
 
496
-		return '<textarea name="'. esc_attr( $name ) .'" id="'. esc_attr( $id ) .'" class="'.esc_attr( $class ).'">'. esc_textarea( $current ) .'</textarea>';
496
+		return '<textarea name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" class="' . esc_attr( $class ) . '">' . esc_textarea( $current ) . '</textarea>';
497 497
 	}
498 498
 
499 499
 	/**
@@ -509,9 +509,9 @@  discard block
 block discarded – undo
509 509
 
510 510
 		_deprecated_function( __METHOD__, '1.2', 'GravityView_FieldType_select::render_input' );
511 511
 
512
-		$output = '<select name="'. $name .'" id="'. $id .'">';
513
-		foreach( $choices as $value => $label ) {
514
-			$output .= '<option value="'. esc_attr( $value ) .'" '. selected( $value, $current, false ) .'>'. esc_html( $label ) .'</option>';
512
+		$output = '<select name="' . $name . '" id="' . $id . '">';
513
+		foreach ( $choices as $value => $label ) {
514
+			$output .= '<option value="' . esc_attr( $value ) . '" ' . selected( $value, $current, false ) . '>' . esc_html( $label ) . '</option>';
515 515
 		}
516 516
 		$output .= '</select>';
517 517
 
Please login to merge, or discard this patch.
includes/admin/metaboxes/views/view-configuration.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
 
27 27
 			<?php
28 28
 
29
-                do_action('gravityview_render_widgets_active_areas', $curr_template, 'footer', $post->ID );
29
+				do_action('gravityview_render_widgets_active_areas', $curr_template, 'footer', $post->ID );
30 30
 
31
-    			do_action('gravityview_render_field_pickers', 'directory' );
31
+				do_action('gravityview_render_field_pickers', 'directory' );
32 32
 
33
-                do_action('gravityview_render_field_and_widget_options', 'directory', $curr_template );
33
+				do_action('gravityview_render_field_and_widget_options', 'directory', $curr_template );
34 34
 
35
-            ?>
35
+			?>
36 36
 
37 37
 			<?php // list of available widgets to be shown in the popup ?>
38 38
             <div id="directory-available-widgets" class="hide-if-js gv-tooltip">
@@ -57,16 +57,16 @@  discard block
 block discarded – undo
57 57
 
58 58
 			<div id="single-active-fields" class="gv-grid gv-grid-pad gv-grid-border">
59 59
 				<?php
60
-                if(!empty( $curr_template ) ) {
61
-				    do_action('gravityview_render_directory_active_areas', $curr_template, 'single', $post->ID, true );
62
-                }
63
-			    ?>
60
+				if(!empty( $curr_template ) ) {
61
+					do_action('gravityview_render_directory_active_areas', $curr_template, 'single', $post->ID, true );
62
+				}
63
+				?>
64 64
 			</div>
65 65
             <?php
66
-                do_action('gravityview_render_field_pickers', 'single' );
66
+				do_action('gravityview_render_field_pickers', 'single' );
67 67
 
68
-                do_action('gravityview_render_field_and_widget_options', 'single', $curr_template );
69
-            ?>
68
+				do_action('gravityview_render_field_and_widget_options', 'single', $curr_template );
69
+			?>
70 70
 		</div>
71 71
 
72 72
 	</div> <?php // end single view tab ?>
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
 			</div>
85 85
 
86 86
 			<?php
87
-			    do_action('gravityview_render_field_pickers', 'edit' );
87
+				do_action('gravityview_render_field_pickers', 'edit' );
88 88
 
89
-			    do_action('gravityview_render_field_and_widget_options', 'edit', $curr_template );
89
+				do_action('gravityview_render_field_and_widget_options', 'edit', $curr_template );
90 90
 			?>
91 91
 
92 92
 		</div>
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -10,34 +10,34 @@  discard block
 block discarded – undo
10 10
 
11 11
 		<div id="directory-fields" class="gv-section">
12 12
 
13
-			<h4><?php esc_html_e( 'Above Entries Widgets', 'gravityview'); ?> <span><?php esc_html_e( 'These widgets will be shown above entries.', 'gravityview'); ?></span></h4>
13
+			<h4><?php esc_html_e( 'Above Entries Widgets', 'gravityview' ); ?> <span><?php esc_html_e( 'These widgets will be shown above entries.', 'gravityview' ); ?></span></h4>
14 14
 
15
-			<?php do_action('gravityview_render_widgets_active_areas', $curr_template, 'header', $post->ID ); ?>
15
+			<?php do_action( 'gravityview_render_widgets_active_areas', $curr_template, 'header', $post->ID ); ?>
16 16
 
17
-			<h4><?php esc_html_e( 'Entries Fields', 'gravityview'); ?> <span><?php esc_html_e( 'These fields will be shown for each entry.', 'gravityview'); ?></span></h4>
17
+			<h4><?php esc_html_e( 'Entries Fields', 'gravityview' ); ?> <span><?php esc_html_e( 'These fields will be shown for each entry.', 'gravityview' ); ?></span></h4>
18 18
 
19 19
 			<div id="directory-active-fields" class="gv-grid gv-grid-pad gv-grid-border">
20
-				<?php if(!empty( $curr_template ) ) {
21
-					do_action('gravityview_render_directory_active_areas', $curr_template, 'directory', $post->ID, true );
20
+				<?php if ( ! empty( $curr_template ) ) {
21
+					do_action( 'gravityview_render_directory_active_areas', $curr_template, 'directory', $post->ID, true );
22 22
 				} ?>
23 23
 			</div>
24 24
 
25
-			<h4><?php esc_html_e( 'Below Entries Widgets', 'gravityview'); ?> <span><?php esc_html_e( 'These widgets will be shown below entries.', 'gravityview'); ?></span></h4>
25
+			<h4><?php esc_html_e( 'Below Entries Widgets', 'gravityview' ); ?> <span><?php esc_html_e( 'These widgets will be shown below entries.', 'gravityview' ); ?></span></h4>
26 26
 
27 27
 			<?php
28 28
 
29
-                do_action('gravityview_render_widgets_active_areas', $curr_template, 'footer', $post->ID );
29
+                do_action( 'gravityview_render_widgets_active_areas', $curr_template, 'footer', $post->ID );
30 30
 
31
-    			do_action('gravityview_render_field_pickers', 'directory' );
31
+    			do_action( 'gravityview_render_field_pickers', 'directory' );
32 32
 
33
-                do_action('gravityview_render_field_and_widget_options', 'directory', $curr_template );
33
+                do_action( 'gravityview_render_field_and_widget_options', 'directory', $curr_template );
34 34
 
35 35
             ?>
36 36
 
37 37
 			<?php // list of available widgets to be shown in the popup ?>
38 38
             <div id="directory-available-widgets" class="hide-if-js gv-tooltip">
39 39
                 <span class="close"><i class="dashicons dashicons-dismiss"></i></span>
40
-				<?php do_action('gravityview_render_available_widgets' ); ?>
40
+				<?php do_action( 'gravityview_render_available_widgets' ); ?>
41 41
             </div>
42 42
 
43 43
 		</div>
@@ -53,19 +53,19 @@  discard block
 block discarded – undo
53 53
 
54 54
 		<div id="single-fields" class="gv-section">
55 55
 
56
-			<h4><?php esc_html_e( 'These fields will be shown in Single Entry view.', 'gravityview'); ?></h4>
56
+			<h4><?php esc_html_e( 'These fields will be shown in Single Entry view.', 'gravityview' ); ?></h4>
57 57
 
58 58
 			<div id="single-active-fields" class="gv-grid gv-grid-pad gv-grid-border">
59 59
 				<?php
60
-                if(!empty( $curr_template ) ) {
61
-				    do_action('gravityview_render_directory_active_areas', $curr_template, 'single', $post->ID, true );
60
+                if ( ! empty( $curr_template ) ) {
61
+				    do_action( 'gravityview_render_directory_active_areas', $curr_template, 'single', $post->ID, true );
62 62
                 }
63 63
 			    ?>
64 64
 			</div>
65 65
             <?php
66
-                do_action('gravityview_render_field_pickers', 'single' );
66
+                do_action( 'gravityview_render_field_pickers', 'single' );
67 67
 
68
-                do_action('gravityview_render_field_and_widget_options', 'single', $curr_template );
68
+                do_action( 'gravityview_render_field_and_widget_options', 'single', $curr_template );
69 69
             ?>
70 70
 		</div>
71 71
 
@@ -75,18 +75,18 @@  discard block
 block discarded – undo
75 75
 
76 76
 		<div id="edit-fields" class="gv-section">
77 77
 
78
-			<h4><?php esc_html_e( 'Fields shown when editing an entry.', 'gravityview'); ?> <span><?php esc_html_e('If not configured, all form fields will be displayed.', 'gravityview'); ?></span></h4>
78
+			<h4><?php esc_html_e( 'Fields shown when editing an entry.', 'gravityview' ); ?> <span><?php esc_html_e( 'If not configured, all form fields will be displayed.', 'gravityview' ); ?></span></h4>
79 79
 
80 80
 			<div id="edit-active-fields" class="gv-grid gv-grid-pad gv-grid-border">
81 81
 				<?php
82
-				do_action('gravityview_render_directory_active_areas', apply_filters( 'gravityview/template/edit', 'default_table_edit' ), 'edit', $post->ID, true );
82
+				do_action( 'gravityview_render_directory_active_areas', apply_filters( 'gravityview/template/edit', 'default_table_edit' ), 'edit', $post->ID, true );
83 83
 				?>
84 84
 			</div>
85 85
 
86 86
 			<?php
87
-			    do_action('gravityview_render_field_pickers', 'edit' );
87
+			    do_action( 'gravityview_render_field_pickers', 'edit' );
88 88
 
89
-			    do_action('gravityview_render_field_and_widget_options', 'edit', $curr_template );
89
+			    do_action( 'gravityview_render_field_and_widget_options', 'edit', $curr_template );
90 90
 			?>
91 91
 
92 92
 		</div>
Please login to merge, or discard this patch.