Completed
Push — develop ( 6b58db...b53c37 )
by Zack
12:25
created
future/includes/class-gv-settings-view.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 		 */
40 40
 		$default_settings = apply_filters( 'gravityview_default_args', array(
41 41
 			'id' => array(
42
-				'label' => __('View ID', 'gravityview'),
42
+				'label' => __( 'View ID', 'gravityview' ),
43 43
 				'type' => 'number',
44 44
 				'group'	=> 'default',
45 45
 				'value' => NULL,
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 				'show_in_shortcode' => false,
48 48
 			),
49 49
 			'page_size' => array(
50
-				'label' 	=> __('Number of entries per page', 'gravityview'),
50
+				'label' 	=> __( 'Number of entries per page', 'gravityview' ),
51 51
 				'type' => 'number',
52 52
 				'class'	=> 'small-text',
53 53
 				'group'	=> 'default',
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 				'show_in_shortcode' => true,
56 56
 			),
57 57
 			'offset' => array(
58
-				'label' 	=> __('Offset entries starting from', 'gravityview'),
58
+				'label' 	=> __( 'Offset entries starting from', 'gravityview' ),
59 59
 				'type' => 'number',
60 60
 				'class'	=> 'small-text',
61 61
 				'group'	=> 'default',
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
 			),
80 80
 			'admin_show_all_statuses' => array(
81 81
 				'label' => __( 'Show all entries to administrators', 'gravityview' ),
82
-				'desc'	=> __('Administrators will be able to see entries with any approval status.', 'gravityview'),
83
-				'tooltip' => __('Logged-out visitors and non-administrators will only see approved entries, while administrators will see entries with all statuses. This makes it easier for administrators to moderate entries from a View.', 'gravityview'),
82
+				'desc'	=> __( 'Administrators will be able to see entries with any approval status.', 'gravityview' ),
83
+				'tooltip' => __( 'Logged-out visitors and non-administrators will only see approved entries, while administrators will see entries with all statuses. This makes it easier for administrators to moderate entries from a View.', 'gravityview' ),
84 84
 				'requires' => 'show_only_approved',
85 85
 				'type' => 'checkbox',
86 86
 				'group'	=> 'default',
@@ -105,40 +105,40 @@  discard block
 block discarded – undo
105 105
 			'user_edit' => array(
106 106
 				'label'	=> __( 'Allow User Edit', 'gravityview' ),
107 107
 				'group'	=> 'default',
108
-				'desc'	=> __('Allow logged-in users to edit entries they created.', 'gravityview'),
108
+				'desc'	=> __( 'Allow logged-in users to edit entries they created.', 'gravityview' ),
109 109
 				'value'	=> 0,
110
-				'tooltip' => __('Display "Edit Entry" fields to non-administrator users if they created the entry. Edit Entry fields will always be displayed to site administrators.', 'gravityview'),
110
+				'tooltip' => __( 'Display "Edit Entry" fields to non-administrator users if they created the entry. Edit Entry fields will always be displayed to site administrators.', 'gravityview' ),
111 111
 				'type'	=> 'checkbox',
112 112
 				'show_in_shortcode' => true,
113 113
 			),
114 114
 			'user_delete' => array(
115 115
 				'label'	=> __( 'Allow User Delete', 'gravityview' ),
116 116
 				'group'	=> 'default',
117
-				'desc'	=> __('Allow logged-in users to delete entries they created.', 'gravityview'),
117
+				'desc'	=> __( 'Allow logged-in users to delete entries they created.', 'gravityview' ),
118 118
 				'value'	=> 0,
119
-				'tooltip' => __('Display "Delete Entry" fields to non-administrator users if they created the entry. Delete Entry fields will always be displayed to site administrators.', 'gravityview'),
119
+				'tooltip' => __( 'Display "Delete Entry" fields to non-administrator users if they created the entry. Delete Entry fields will always be displayed to site administrators.', 'gravityview' ),
120 120
 				'type'	=> 'checkbox',
121 121
 				'show_in_shortcode' => true,
122 122
 			),
123 123
 			'sort_field' => array(
124
-				'label'	=> __('Sort by field', 'gravityview'),
124
+				'label'	=> __( 'Sort by field', 'gravityview' ),
125 125
 				'type' => 'select',
126 126
 				'value' => '',
127 127
 				'group'	=> 'sort',
128 128
 				'options' => array(
129
-					'' => __( 'Default', 'gravityview'),
130
-					'date_created' => __( 'Date Created', 'gravityview'),
129
+					'' => __( 'Default', 'gravityview' ),
130
+					'date_created' => __( 'Date Created', 'gravityview' ),
131 131
 				),
132 132
 				'show_in_shortcode' => true,
133 133
 			),
134 134
 			'sort_direction' => array(
135
-				'label' 	=> __('Sort direction', 'gravityview'),
135
+				'label' 	=> __( 'Sort direction', 'gravityview' ),
136 136
 				'type' => 'select',
137 137
 				'value' => 'ASC',
138 138
 				'group'	=> 'sort',
139 139
 				'options' => array(
140
-					'ASC' => __('ASC', 'gravityview'),
141
-					'DESC' => __('DESC', 'gravityview'),
140
+					'ASC' => __( 'ASC', 'gravityview' ),
141
+					'DESC' => __( 'DESC', 'gravityview' ),
142 142
 					//'RAND' => __('Random', 'gravityview'),
143 143
 				),
144 144
 				'show_in_shortcode' => true,
@@ -154,69 +154,69 @@  discard block
 block discarded – undo
154 154
 				'show_in_template' => array( 'default_table', 'preset_business_data', 'preset_issue_tracker', 'preset_resume_board', 'preset_job_board' ),
155 155
 			),
156 156
 			'start_date' => array(
157
-				'label' 	=> __('Filter by Start Date', 'gravityview'),
157
+				'label' 	=> __( 'Filter by Start Date', 'gravityview' ),
158 158
 				'class'	=> 'gv-datepicker',
159
-				'desc'	=> __('Show entries submitted after this date. Supports relative dates, such as "-1 week" or "-1 month".', 'gravityview' ),
159
+				'desc'	=> __( 'Show entries submitted after this date. Supports relative dates, such as "-1 week" or "-1 month".', 'gravityview' ),
160 160
 				'type' => 'text',
161 161
 				'value' => '',
162 162
 				'group'	=> 'filter',
163 163
 				'show_in_shortcode' => true,
164 164
 			),
165 165
 			'end_date' => array(
166
-				'label' 	=> __('Filter by End Date', 'gravityview'),
166
+				'label' 	=> __( 'Filter by End Date', 'gravityview' ),
167 167
 				'class'	=> 'gv-datepicker',
168
-				'desc'	=> __('Show entries submitted before this date. Supports relative dates, such as "now" or "-3 days".', 'gravityview' ),
168
+				'desc'	=> __( 'Show entries submitted before this date. Supports relative dates, such as "now" or "-3 days".', 'gravityview' ),
169 169
 				'type' => 'text',
170 170
 				'value' => '',
171 171
 				'group'	=> 'filter',
172 172
 				'show_in_shortcode' => true,
173 173
 			),
174 174
 			'class' => array(
175
-				'label' 	=> __('CSS Class', 'gravityview'),
176
-				'desc'	=> __('CSS class to add to the wrapping HTML container.', 'gravityview'),
175
+				'label' 	=> __( 'CSS Class', 'gravityview' ),
176
+				'desc'	=> __( 'CSS class to add to the wrapping HTML container.', 'gravityview' ),
177 177
 				'group'	=> 'default',
178 178
 				'type' => 'text',
179 179
 				'value' => '',
180 180
 				'show_in_shortcode' => false,
181 181
 			),
182 182
 			'search_value' => array(
183
-				'label' 	=> __('Search Value', 'gravityview'),
184
-				'desc'	=> __('Define a default search value for the View', 'gravityview'),
183
+				'label' 	=> __( 'Search Value', 'gravityview' ),
184
+				'desc'	=> __( 'Define a default search value for the View', 'gravityview' ),
185 185
 				'type' => 'text',
186 186
 				'value' => '',
187 187
 				'group'	=> 'filter',
188 188
 				'show_in_shortcode' => false,
189 189
 			),
190 190
 			'search_field' => array(
191
-				'label' 	=> __('Search Field', 'gravityview'),
192
-				'desc'	=> __('If Search Value is set, you can define a specific field to search in. Otherwise, all fields will be searched.', 'gravityview'),
191
+				'label' 	=> __( 'Search Field', 'gravityview' ),
192
+				'desc'	=> __( 'If Search Value is set, you can define a specific field to search in. Otherwise, all fields will be searched.', 'gravityview' ),
193 193
 				'type' => 'number',
194 194
 				'value' => '',
195 195
 				'group'	=> 'filter',
196 196
 				'show_in_shortcode' => false,
197 197
 			),
198 198
 			'single_title' => array(
199
-				'label'	=> __('Single Entry Title', 'gravityview'),
199
+				'label'	=> __( 'Single Entry Title', 'gravityview' ),
200 200
 				'type'	=> 'text',
201
-				'desc'	=> __('When viewing a single entry, change the title of the page to this setting. Otherwise, the title will not change between the Multiple Entries and Single Entry views.', 'gravityview'),
201
+				'desc'	=> __( 'When viewing a single entry, change the title of the page to this setting. Otherwise, the title will not change between the Multiple Entries and Single Entry views.', 'gravityview' ),
202 202
 				'group'	=> 'default',
203 203
 				'value'	=> '',
204 204
 				'show_in_shortcode' => false,
205 205
 				'full_width' => true,
206 206
 			),
207 207
 			'back_link_label' => array(
208
-				'label'	=> __('Back Link Label', 'gravityview'),
208
+				'label'	=> __( 'Back Link Label', 'gravityview' ),
209 209
 				'group'	=> 'default',
210
-				'desc'	=> __('The text of the link that returns to the multiple entries view.', 'gravityview'),
210
+				'desc'	=> __( 'The text of the link that returns to the multiple entries view.', 'gravityview' ),
211 211
 				'type'	=> 'text',
212 212
 				'value'	=> '',
213 213
 				'show_in_shortcode' => false,
214 214
 				'full_width' => true,
215 215
 			),
216 216
 			'embed_only' => array(
217
-				'label'	=> __('Prevent Direct Access', 'gravityview'),
217
+				'label'	=> __( 'Prevent Direct Access', 'gravityview' ),
218 218
 				'group'	=> 'default',
219
-				'desc'	=> __('Only allow access to this View when embedded using the shortcode.', 'gravityview'),
219
+				'desc'	=> __( 'Only allow access to this View when embedded using the shortcode.', 'gravityview' ),
220 220
 				'type'	=> 'checkbox',
221 221
 				'value'	=> '',
222 222
 				'tooltip' => false,
@@ -239,19 +239,19 @@  discard block
 block discarded – undo
239 239
 		// By default, we only want the key => value pairing, not the whole array.
240 240
 		if ( ! $detailed ) {
241 241
 			$defaults = array();
242
-			foreach( $default_settings as $key => $value ) {
243
-				$defaults[ $key ] = $value['value'];
242
+			foreach ( $default_settings as $key => $value ) {
243
+				$defaults[ $key ] = $value[ 'value' ];
244 244
 			}
245 245
 			return $defaults;
246 246
 
247 247
 		// But sometimes, we want all the details.
248 248
 		} else {
249
-			foreach ($default_settings as $key => $value) {
249
+			foreach ( $default_settings as $key => $value ) {
250 250
 
251 251
 				// If the $group argument is set for the method,
252 252
 				// ignore any settings that aren't in that group.
253 253
 				if ( ! empty( $group ) && is_string( $group ) ) {
254
-					if ( empty( $value['group'] ) || $value['group'] !== $group ) {
254
+					if ( empty( $value[ 'group' ] ) || $value[ 'group' ] !== $group ) {
255 255
 						unset( $default_settings[ $key ] );
256 256
 					}
257 257
 				}
Please login to merge, or discard this patch.
includes/fields/class-gravityview-field-source-url.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,24 +26,24 @@
 block discarded – undo
26 26
 	function field_options( $field_options, $template_id, $field_id, $context, $input_type ) {
27 27
 
28 28
 		// Don't link to entry; doesn't make sense.
29
-		unset( $field_options['show_as_link'] );
29
+		unset( $field_options[ 'show_as_link' ] );
30 30
 
31
-		if( 'edit' === $context ) {
31
+		if ( 'edit' === $context ) {
32 32
 			return $field_options;
33 33
 		}
34 34
 
35 35
 		$add_options = array();
36
-		$add_options['link_to_source'] = array(
36
+		$add_options[ 'link_to_source' ] = array(
37 37
 			'type' => 'checkbox',
38 38
 			'label' => __( 'Link to URL:', 'gravityview' ),
39
-			'desc' => __('Display as a link to the Source URL', 'gravityview'),
39
+			'desc' => __( 'Display as a link to the Source URL', 'gravityview' ),
40 40
 			'value' => false,
41 41
 			'merge_tags' => false,
42 42
 		);
43
-		$add_options['source_link_text'] = array(
43
+		$add_options[ 'source_link_text' ] = array(
44 44
 			'type' => 'text',
45 45
 			'label' => __( 'Link Text:', 'gravityview' ),
46
-			'desc' => __('Customize the link text. If empty, the link text will be the URL.', 'gravityview'),
46
+			'desc' => __( 'Customize the link text. If empty, the link text will be the URL.', 'gravityview' ),
47 47
 			'value' => NULL,
48 48
 			'merge_tags' => true,
49 49
 		);
Please login to merge, or discard this patch.
future/includes/class-gv-entry-gravityforms.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 *
37 37
 	 * @api
38 38
 	 * @since future
39
-	 * @return \GV\Entry|null An instance of this entry or null if not found.
39
+	 * @return null|GF_Entry An instance of this entry or null if not found.
40 40
 	 */
41 41
 	public static function by_id( $entry_id ) {
42 42
 		$entry = \GFAPI::get_entry( $entry_id );
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 *
53 53
 	 * @param array $entry The array ID.
54 54
 	 *
55
-	 * @return \GV\Entry|null An instance of this entry or null if not found.
55
+	 * @return null|GF_Entry An instance of this entry or null if not found.
56 56
 	 */
57 57
 	public static function from_entry( $entry ) {
58 58
 		if ( empty( $entry['id'] ) ) {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public static function by_id( $entry_id ) {
42 42
 		$entry = \GFAPI::get_entry( $entry_id );
43
-		if ( !$entry ) {
43
+		if ( ! $entry ) {
44 44
 			return null;
45 45
 		}
46 46
 
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
 	 * @return \GV\Entry|null An instance of this entry or null if not found.
56 56
 	 */
57 57
 	public static function from_entry( $entry ) {
58
-		if ( empty( $entry['id'] ) ) {
58
+		if ( empty( $entry[ 'id' ] ) ) {
59 59
 			return null;
60 60
 		}
61 61
 
62 62
 		$self = new self();
63 63
 		$self->entry = $entry;
64 64
 
65
-		$self->ID = $self->entry['id'];
65
+		$self->ID = $self->entry[ 'id' ];
66 66
 
67 67
 		return $self;
68 68
 	}
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 * @return bool Whether the offset exists or not.
77 77
 	 */
78 78
 	public function offsetExists( $offset ) {
79
-		return isset( $this->entry[$offset] );
79
+		return isset( $this->entry[ $offset ] );
80 80
 	}
81 81
 
82 82
 	/**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 * @return mixed The value of the requested entry data.
92 92
 	 */
93 93
 	public function offsetGet( $offset ) {
94
-		return $this->entry[$offset];
94
+		return $this->entry[ $offset ];
95 95
 	}
96 96
 
97 97
 	/**
Please login to merge, or discard this patch.
includes/class-gravityview-logging.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@  discard block
 block discarded – undo
12 12
 		add_action( 'gravityview_log_debug', array( $this, 'log_debug'), 10, 2 );
13 13
 
14 14
 		// Enable debug with Gravity Forms Logging Add-on
15
-	    add_filter( 'gform_logging_supported', array( $this, 'enable_gform_logging' ) );
15
+		add_filter( 'gform_logging_supported', array( $this, 'enable_gform_logging' ) );
16 16
 
17
-	    // Load Debug Bar integration
18
-	    add_filter( 'debug_bar_panels', array( $this, 'add_debug_bar' ) );
17
+		// Load Debug Bar integration
18
+		add_filter( 'debug_bar_panels', array( $this, 'add_debug_bar' ) );
19 19
 
20 20
 	}
21 21
 
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 	 * @param array $supported_plugins List of plugins
45 45
 	 */
46 46
 	public function enable_gform_logging( $supported_plugins ) {
47
-	    $supported_plugins['gravityview'] = 'GravityView';
48
-	    return $supported_plugins;
47
+		$supported_plugins['gravityview'] = 'GravityView';
48
+		return $supported_plugins;
49 49
 	}
50 50
 
51 51
 	/**
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
 
97 97
 		if ( class_exists("GFLogging") ) {
98 98
 			GFLogging::include_logger();
99
-	        GFLogging::log_message( 'gravityview', $function( $message, true ) . $function($data, true), KLogger::DEBUG );
100
-	    }
99
+			GFLogging::log_message( 'gravityview', $function( $message, true ) . $function($data, true), KLogger::DEBUG );
100
+		}
101 101
 	}
102 102
 
103 103
 	static function log_error( $message = '', $data = null  ) {
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
 		}
116 116
 
117 117
 		if ( class_exists("GFLogging") ) {
118
-		    GFLogging::include_logger();
119
-		    GFLogging::log_message( 'gravityview', $function ( $message, true ) . $function ( $error, true), KLogger::ERROR );
118
+			GFLogging::include_logger();
119
+			GFLogging::log_message( 'gravityview', $function ( $message, true ) . $function ( $error, true), KLogger::ERROR );
120 120
 		}
121 121
 	}
122 122
 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@  discard block
 block discarded – undo
7 7
 
8 8
 	function __construct() {
9 9
 
10
-		add_action( 'gravityview_log_error', array( $this, 'log_error'), 10, 2 );
10
+		add_action( 'gravityview_log_error', array( $this, 'log_error' ), 10, 2 );
11 11
 
12
-		add_action( 'gravityview_log_debug', array( $this, 'log_debug'), 10, 2 );
12
+		add_action( 'gravityview_log_debug', array( $this, 'log_debug' ), 10, 2 );
13 13
 
14 14
 		// Enable debug with Gravity Forms Logging Add-on
15 15
 	    add_filter( 'gform_logging_supported', array( $this, 'enable_gform_logging' ) );
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 			include_once( GRAVITYVIEW_DIR . 'includes/class-debug-bar.php' );
35 35
 		}
36 36
 
37
-		$panels[] = new GravityView_Debug_Bar;
37
+		$panels[ ] = new GravityView_Debug_Bar;
38 38
 
39 39
 		return $panels;
40 40
 	}
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 * @param array $supported_plugins List of plugins
45 45
 	 */
46 46
 	public function enable_gform_logging( $supported_plugins ) {
47
-	    $supported_plugins['gravityview'] = 'GravityView';
47
+	    $supported_plugins[ 'gravityview' ] = 'GravityView';
48 48
 	    return $supported_plugins;
49 49
 	}
50 50
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	 * @return string "print_r" or "var_export"
73 73
 	 */
74 74
 	static function get_print_function() {
75
-		if( ob_get_level() > 0 ) {
75
+		if ( ob_get_level() > 0 ) {
76 76
 			$function = 'var_export';
77 77
 		} else {
78 78
 			$function = 'print_r';
@@ -90,17 +90,17 @@  discard block
 block discarded – undo
90 90
 			'data' => $data,
91 91
 		);
92 92
 
93
-		if( !in_array( $notice, self::$notices ) ) {
94
-			self::$notices[] = $notice;
93
+		if ( ! in_array( $notice, self::$notices ) ) {
94
+			self::$notices[ ] = $notice;
95 95
 		}
96 96
 
97
-		if ( class_exists("GFLogging") ) {
97
+		if ( class_exists( "GFLogging" ) ) {
98 98
 			GFLogging::include_logger();
99
-	        GFLogging::log_message( 'gravityview', $function( $message, true ) . $function($data, true), KLogger::DEBUG );
99
+	        GFLogging::log_message( 'gravityview', $function( $message, true ) . $function( $data, true ), KLogger::DEBUG );
100 100
 	    }
101 101
 	}
102 102
 
103
-	static function log_error( $message = '', $data = null  ) {
103
+	static function log_error( $message = '', $data = null ) {
104 104
 
105 105
 		$function = self::get_print_function();
106 106
 
@@ -110,13 +110,13 @@  discard block
 block discarded – undo
110 110
 			'backtrace' => function_exists( 'wp_debug_backtrace_summary' ) ? wp_debug_backtrace_summary( null, 3 ) : '',
111 111
 		);
112 112
 
113
-		if( !in_array( $error, self::$errors ) ) {
114
-			self::$errors[] = $error;
113
+		if ( ! in_array( $error, self::$errors ) ) {
114
+			self::$errors[ ] = $error;
115 115
 		}
116 116
 
117
-		if ( class_exists("GFLogging") ) {
117
+		if ( class_exists( "GFLogging" ) ) {
118 118
 		    GFLogging::include_logger();
119
-		    GFLogging::log_message( 'gravityview', $function ( $message, true ) . $function ( $error, true), KLogger::ERROR );
119
+		    GFLogging::log_message( 'gravityview', $function( $message, true ) . $function( $error, true ), KLogger::ERROR );
120 120
 		}
121 121
 	}
122 122
 
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-date.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@
 block discarded – undo
11 11
 ?>
12 12
 
13 13
 <div class="gv-search-box gv-search-date">
14
-	<?php if( ! gv_empty( $search_field['label'], false, false ) ) { ?>
15
-	<label for="search-box-<?php echo esc_attr( $search_field['name'] ); ?>"><?php echo esc_html( $search_field['label'] ); ?></label>
14
+	<?php if ( ! gv_empty( $search_field[ 'label' ], false, false ) ) { ?>
15
+	<label for="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>"><?php echo esc_html( $search_field[ 'label' ] ); ?></label>
16 16
 	<?php } ?>
17 17
 	<p>
18
-		<input type="text" name="<?php echo esc_attr( $search_field['name'] ); ?>" id="search-box-<?php echo esc_attr( $search_field['name'] ); ?>" value="<?php echo esc_attr( $search_field['value'] ); ?>" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" >
18
+		<input type="text" name="<?php echo esc_attr( $search_field[ 'name' ] ); ?>" id="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>" value="<?php echo esc_attr( $search_field[ 'value' ] ); ?>" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" >
19 19
 	</p>
20 20
 </div>
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-multiselect.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 $search_field = $gravityview_view->search_field;
11 11
 
12 12
 // Make sure that there are choices to display
13
-if( empty( $search_field['choices'] ) ) {
14
-	do_action('gravityview_log_debug', 'search-field-multiselect.php - No choices for field' );
13
+if ( empty( $search_field[ 'choices' ] ) ) {
14
+	do_action( 'gravityview_log_debug', 'search-field-multiselect.php - No choices for field' );
15 15
 	return;
16 16
 }
17 17
 
@@ -21,19 +21,19 @@  discard block
 block discarded – undo
21 21
  * @param string $default_option Default: `&mdash;` (—)
22 22
  * @param string $field_type Field type: "select" or "multiselect"
23 23
  */
24
-$default_option = apply_filters('gravityview/extension/search/select_default', '&mdash;', 'multiselect' );
24
+$default_option = apply_filters( 'gravityview/extension/search/select_default', '&mdash;', 'multiselect' );
25 25
 
26 26
 ?>
27 27
 <div class="gv-search-box gv-search-field-multiselect">
28
-	<?php if( ! gv_empty( $search_field['label'], false, false ) ) { ?>
29
-		<label for="search-box-<?php echo esc_attr( $search_field['name'] ); ?>"><?php echo esc_html( $search_field['label'] ); ?></label>
28
+	<?php if ( ! gv_empty( $search_field[ 'label' ], false, false ) ) { ?>
29
+		<label for="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>"><?php echo esc_html( $search_field[ 'label' ] ); ?></label>
30 30
 	<?php } ?>
31 31
 	<p>
32
-		<select name="<?php echo esc_attr( $search_field['name'] ); ?>[]" id="search-box-<?php echo esc_attr( $search_field['name'] ); ?>" multiple>
33
-			<option value="" <?php gv_selected( '', $search_field['value'], true ); ?>><?php echo esc_html( $default_option ); ?></option>
32
+		<select name="<?php echo esc_attr( $search_field[ 'name' ] ); ?>[]" id="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>" multiple>
33
+			<option value="" <?php gv_selected( '', $search_field[ 'value' ], true ); ?>><?php echo esc_html( $default_option ); ?></option>
34 34
 			<?php
35
-			foreach( $search_field['choices'] as $choice ) : ?>
36
-				<option value="<?php echo esc_attr( $choice['value'] ); ?>" <?php gv_selected( $choice['value'], $search_field['value'], true ); ?>><?php echo esc_html( $choice['text'] ); ?></option>
35
+			foreach ( $search_field[ 'choices' ] as $choice ) : ?>
36
+				<option value="<?php echo esc_attr( $choice[ 'value' ] ); ?>" <?php gv_selected( $choice[ 'value' ], $search_field[ 'value' ], true ); ?>><?php echo esc_html( $choice[ 'text' ] ); ?></option>
37 37
 			<?php endforeach; ?>
38 38
 		</select>
39 39
 	</p>
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-entry_date.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@
 block discarded – undo
7 7
 
8 8
 $gravityview_view = GravityView_View::getInstance();
9 9
 $view_id = $gravityview_view->getViewId();
10
-$value = $gravityview_view->search_field['value'];
11
-$label = $gravityview_view->search_field['label'];
10
+$value = $gravityview_view->search_field[ 'value' ];
11
+$label = $gravityview_view->search_field[ 'label' ];
12 12
 
13 13
 ?>
14 14
 
15 15
 <div class="gv-search-box gv-search-date gv-search-date-range gv-search-field-entry_date">
16
-	<?php if( ! gv_empty( $label, false, false ) ) { ?>
16
+	<?php if ( ! gv_empty( $label, false, false ) ) { ?>
17 17
 	<label for="gv_start_date_<?php echo $view_id; ?>"><?php echo esc_html( $label ); ?></label>
18 18
 	<?php } ?>
19 19
 	<p>
20
-		<input name="gv_start" id="gv_start_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e('Start date', 'gravityview' ); ?>" value="<?php echo $value['start']; ?>">
21
-		<input name="gv_end" id="gv_end_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e('End date', 'gravityview' ); ?>" value="<?php echo $value['end']; ?>">
20
+		<input name="gv_start" id="gv_start_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e( 'Start date', 'gravityview' ); ?>" value="<?php echo $value[ 'start' ]; ?>">
21
+		<input name="gv_end" id="gv_end_date_<?php echo $view_id; ?>" type="text" class="<?php echo esc_html( $gravityview_view->datepicker_class ); ?>" placeholder="<?php esc_attr_e( 'End date', 'gravityview' ); ?>" value="<?php echo $value[ 'end' ]; ?>">
22 22
 	</p>
23 23
 </div>
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-select.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@  discard block
 block discarded – undo
10 10
 $search_field = $gravityview_view->search_field;
11 11
 
12 12
 // Make sure that there are choices to display
13
-if( empty( $search_field['choices'] ) ) {
14
-	do_action('gravityview_log_debug', 'search-field-select.php - No choices for field' );
13
+if ( empty( $search_field[ 'choices' ] ) ) {
14
+	do_action( 'gravityview_log_debug', 'search-field-select.php - No choices for field' );
15 15
 	return;
16 16
 }
17 17
 
@@ -21,19 +21,19 @@  discard block
 block discarded – undo
21 21
  * @param string $default_option Default: `&mdash;` (—)
22 22
  * @param string $field_type Field type: "select" or "multiselect"
23 23
  */
24
-$default_option = apply_filters('gravityview/extension/search/select_default', '&mdash;', 'select' );
24
+$default_option = apply_filters( 'gravityview/extension/search/select_default', '&mdash;', 'select' );
25 25
 
26 26
 ?>
27 27
 <div class="gv-search-box gv-search-field-select">
28
-	<?php if( ! gv_empty( $search_field['label'], false, false ) ) { ?>
29
-		<label for="search-box-<?php echo esc_attr( $search_field['name'] ); ?>"><?php echo esc_html( $search_field['label'] ); ?></label>
28
+	<?php if ( ! gv_empty( $search_field[ 'label' ], false, false ) ) { ?>
29
+		<label for="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>"><?php echo esc_html( $search_field[ 'label' ] ); ?></label>
30 30
 	<?php } ?>
31 31
 	<p>
32
-		<select name="<?php echo esc_attr( $search_field['name'] ); ?>" id="search-box-<?php echo esc_attr( $search_field['name'] ); ?>">
33
-			<option value="" <?php gv_selected( '', $search_field['value'], true ); ?>><?php echo esc_html( $default_option ); ?></option>
32
+		<select name="<?php echo esc_attr( $search_field[ 'name' ] ); ?>" id="search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>">
33
+			<option value="" <?php gv_selected( '', $search_field[ 'value' ], true ); ?>><?php echo esc_html( $default_option ); ?></option>
34 34
 			<?php
35
-			foreach( $search_field['choices'] as $choice ) : ?>
36
-				<option value="<?php echo esc_attr( $choice['value'] ); ?>" <?php gv_selected( esc_attr( $choice['value'] ), esc_attr( $search_field['value'] ), true ); ?>><?php echo esc_html( $choice['text'] ); ?></option>
35
+			foreach ( $search_field[ 'choices' ] as $choice ) : ?>
36
+				<option value="<?php echo esc_attr( $choice[ 'value' ] ); ?>" <?php gv_selected( esc_attr( $choice[ 'value' ] ), esc_attr( $search_field[ 'value' ] ), true ); ?>><?php echo esc_html( $choice[ 'text' ] ); ?></option>
37 37
 			<?php endforeach; ?>
38 38
 		</select>
39 39
 	</p>
Please login to merge, or discard this patch.
includes/widgets/search-widget/templates/search-field-radio.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,22 +10,22 @@
 block discarded – undo
10 10
 $search_field = $gravityview_view->search_field;
11 11
 
12 12
 // Make sure that there are choices to display
13
-if( empty( $search_field['choices'] ) ) {
14
-	do_action('gravityview_log_debug', 'search-field-radio.php - No choices for field' );
13
+if ( empty( $search_field[ 'choices' ] ) ) {
14
+	do_action( 'gravityview_log_debug', 'search-field-radio.php - No choices for field' );
15 15
 	return;
16 16
 }
17 17
 
18 18
 ?>
19 19
 <div class="gv-search-box gv-search-field-radio">
20
-	<?php if( ! gv_empty( $search_field['label'], false, false ) ) { ?>
21
-	<label for=search-box-<?php echo esc_attr( $search_field['name'] ); ?>><?php echo esc_html( $search_field['label'] ); ?></label>
20
+	<?php if ( ! gv_empty( $search_field[ 'label' ], false, false ) ) { ?>
21
+	<label for=search-box-<?php echo esc_attr( $search_field[ 'name' ] ); ?>><?php echo esc_html( $search_field[ 'label' ] ); ?></label>
22 22
 	<?php } ?>
23 23
 	<p>
24
-	<?php foreach( $search_field['choices'] as $choice ) { ?>
24
+	<?php foreach ( $search_field[ 'choices' ] as $choice ) { ?>
25 25
 
26
-		<label for="search-box-<?php echo sanitize_html_class( $search_field['name'].$choice['value'].$choice['text'] ); ?>" class="gv-check-radio">
27
-			<input type="radio" name="<?php echo esc_attr( $search_field['name'] ); ?>" value="<?php echo esc_attr( $choice['value'] ); ?>" id="search-box-<?php echo sanitize_html_class( $search_field['name'].$choice['value'].$choice['text'] ); ?>" <?php checked( $choice['value'], $search_field['value'], true ); ?>>
28
-			<?php echo esc_html( $choice['text'] ); ?>
26
+		<label for="search-box-<?php echo sanitize_html_class( $search_field[ 'name' ] . $choice[ 'value' ] . $choice[ 'text' ] ); ?>" class="gv-check-radio">
27
+			<input type="radio" name="<?php echo esc_attr( $search_field[ 'name' ] ); ?>" value="<?php echo esc_attr( $choice[ 'value' ] ); ?>" id="search-box-<?php echo sanitize_html_class( $search_field[ 'name' ] . $choice[ 'value' ] . $choice[ 'text' ] ); ?>" <?php checked( $choice[ 'value' ], $search_field[ 'value' ], true ); ?>>
28
+			<?php echo esc_html( $choice[ 'text' ] ); ?>
29 29
 		</label>
30 30
 
31 31
 	<?php } ?>
Please login to merge, or discard this patch.