Completed
Branch master (3ac4b1)
by Zack
04:30
created
includes/fields/time.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -255,7 +255,6 @@
 block discarded – undo
255 255
 	 * Get the default date format for a field based on the field ID and the time format setting
256 256
 	 *
257 257
 	 * @since 1.14
258
-
259 258
 	 * @param string $time_format The time format ("12" or "24"). Default: "12" {@since 1.14}
260 259
 	 * @param int $field_id The ID of the field. Used to figure out full time/hours/minutes/am/pm {@since 1.14}
261 260
 	 *
Please login to merge, or discard this patch.
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
 	public function __construct() {
39 39
 		parent::__construct();
40 40
 
41
-		add_filter( 'gravityview/sorting/time', array( $this, 'modify_sort_id' ), 10, 2 );
41
+		add_filter('gravityview/sorting/time', array($this, 'modify_sort_id'), 10, 2);
42 42
 
43
-		add_filter('gravityview_search_criteria', array( $this, '_maybe_filter_gravity_forms_query' ), 10, 4 );
43
+		add_filter('gravityview_search_criteria', array($this, '_maybe_filter_gravity_forms_query'), 10, 4);
44 44
 	}
45 45
 
46 46
 	/**
@@ -54,14 +54,14 @@  discard block
 block discarded – undo
54 54
 	 *
55 55
 	 * @return string Modified sort key imploded with $_sort_divider, like `5|:time:|12|:time:|h:i A`
56 56
 	 */
57
-	public function modify_sort_id( $sort_field_id, $form_id ) {
57
+	public function modify_sort_id($sort_field_id, $form_id) {
58 58
 
59
-		$time_format = self::_get_time_format_for_field( $sort_field_id, $form_id );
59
+		$time_format = self::_get_time_format_for_field($sort_field_id, $form_id);
60 60
 
61
-		$date_format = self::date_format( $time_format, $sort_field_id );
61
+		$date_format = self::date_format($time_format, $sort_field_id);
62 62
 
63 63
 		// Should look something like `5|:time:|12|:time:|h:i A`
64
-		$new_sort_field_id = implode( $this->_sort_divider, array( $sort_field_id, $time_format, $date_format ) );
64
+		$new_sort_field_id = implode($this->_sort_divider, array($sort_field_id, $time_format, $date_format));
65 65
 
66 66
 		return $new_sort_field_id;
67 67
 	}
@@ -78,25 +78,25 @@  discard block
 block discarded – undo
78 78
 	 *
79 79
 	 * @return $criteria If a match, the sorting will be updated to set `is_numeric` to true and make sure the field ID is an int
80 80
 	 */
81
-	public function _maybe_filter_gravity_forms_query( $criteria, $form_ids, $view_id ) {
81
+	public function _maybe_filter_gravity_forms_query($criteria, $form_ids, $view_id) {
82 82
 
83 83
 		// If the search is being sorted
84
-		if( ! empty( $criteria['sorting']['key'] ) ) {
84
+		if (!empty($criteria['sorting']['key'])) {
85 85
 
86
-			$pieces = explode( $this->_sort_divider, $criteria['sorting']['key'] );
86
+			$pieces = explode($this->_sort_divider, $criteria['sorting']['key']);
87 87
 
88 88
 			/**
89 89
 			 * And the sort key matches the key set in modify_sort_id(), then modify the Gravity Forms query SQL
90 90
 			 * @see modify_sort_id()
91 91
 			 */
92
-			if( ! empty( $pieces[1] ) ) {
92
+			if (!empty($pieces[1])) {
93 93
 
94 94
 				// Pass these to the _modify_query_sort_by_time_hack() method
95 95
 				$this->_time_format = $pieces[1];
96 96
 				$this->_date_format = $pieces[2];
97 97
 
98 98
 				// Remove fake input IDs (5.1 doesn't exist. Use 5)
99
-				$criteria['sorting']['key'] = floor( $pieces[0] );
99
+				$criteria['sorting']['key'] = floor($pieces[0]);
100 100
 
101 101
 				/**
102 102
 				 * Make sure sorting is numeric (# of seconds). IMPORTANT.
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 				$criteria['sorting']['is_numeric'] = true;
106 106
 
107 107
 				// Modify the Gravity Forms WP Query
108
-				add_filter('query', array( $this, '_modify_query_sort_by_time_hack' ) );
108
+				add_filter('query', array($this, '_modify_query_sort_by_time_hack'));
109 109
 			}
110 110
 		}
111 111
 
@@ -121,22 +121,22 @@  discard block
 block discarded – undo
121 121
 	 *
122 122
 	 * @return string Modified query, if the query matches the expected Gravity Forms SQL string used for sorting time fields. Otherwise, original query.
123 123
 	 */
124
-	function _modify_query_sort_by_time_hack( $query ) {
124
+	function _modify_query_sort_by_time_hack($query) {
125 125
 
126 126
 		/**
127 127
 		 * If this is a Gravity Forms entry selection sorting query, generated by sort_by_field_query(),
128 128
 		 * then we want to modify the query.
129 129
 		 * @see GFFormsModel::sort_by_field_query()
130 130
 		 */
131
-		if( strpos( $query, self::GF_SORTING_SQL ) > 0 ) {
131
+		if (strpos($query, self::GF_SORTING_SQL) > 0) {
132 132
 
133
-			if( $this->_time_format === '24' ) {
133
+			if ($this->_time_format === '24') {
134 134
 				$sql_str_to_date = "STR_TO_DATE( `value`, '%H:%i' )";
135 135
 			} else {
136 136
 				$sql_str_to_date = "STR_TO_DATE( `value`, '%h:%i %p' )";
137 137
 			}
138 138
 
139
-			switch ( $this->_date_format ) {
139
+			switch ($this->_date_format) {
140 140
 				case 'h':
141 141
 				case 'H':
142 142
 					$modification = "TIME_FORMAT( {$sql_str_to_date}, '%H' )";
@@ -154,40 +154,40 @@  discard block
 block discarded – undo
154 154
 			 * Convert the time (12:30 pm) to the MySQL `TIME_TO_SEC()` value for that time (45000)
155 155
 			 * This way, Gravity Forms is able to sort numerically.
156 156
 			 */
157
-			$replacement_query = str_replace( 'value', "{$modification} as value", self::GF_SORTING_SQL );
157
+			$replacement_query = str_replace('value', "{$modification} as value", self::GF_SORTING_SQL);
158 158
 
159 159
 			/**
160 160
 			 * Replace it in the main query
161 161
 			 */
162
-			$query = str_replace( self::GF_SORTING_SQL, $replacement_query, $query );
162
+			$query = str_replace(self::GF_SORTING_SQL, $replacement_query, $query);
163 163
 
164 164
 			/**
165 165
 			 * REMOVE the Gravity Forms WP Query modifications!
166 166
 			 */
167
-			remove_filter( 'query', array( $this, '_modify_query_sort_by_time_hack' ) );
167
+			remove_filter('query', array($this, '_modify_query_sort_by_time_hack'));
168 168
 		}
169 169
 
170 170
 		return $query;
171 171
 	}
172 172
 
173 173
 
174
-	function field_options( $field_options, $template_id = '', $field_id = '', $context = '', $input_type = '' ) {
174
+	function field_options($field_options, $template_id = '', $field_id = '', $context = '', $input_type = '') {
175 175
 
176 176
 		// Set variables
177
-		parent::field_options( $field_options, $template_id, $field_id, $context, $input_type );
177
+		parent::field_options($field_options, $template_id, $field_id, $context, $input_type);
178 178
 
179
-		if( 'edit' === $context ) {
179
+		if ('edit' === $context) {
180 180
 			return $field_options;
181 181
 		}
182 182
 
183 183
 		/**
184 184
 		 * Set default date format based on field ID and Form ID
185 185
 		 */
186
-		add_filter('gravityview_date_format', array( $this, '_filter_date_display_date_format' ) );
186
+		add_filter('gravityview_date_format', array($this, '_filter_date_display_date_format'));
187 187
 
188
-		$this->add_field_support('date_display', $field_options );
188
+		$this->add_field_support('date_display', $field_options);
189 189
 
190
-		remove_filter('gravityview_date_format', array( $this, '_filter_date_display_date_format' ) );
190
+		remove_filter('gravityview_date_format', array($this, '_filter_date_display_date_format'));
191 191
 
192 192
 		return $field_options;
193 193
 	}
@@ -202,9 +202,9 @@  discard block
 block discarded – undo
202 202
 	private function _get_time_format() {
203 203
 		global $post;
204 204
 
205
-		$current_form = isset( $_POST['form_id'] ) ? intval( $_POST['form_id'] ) : gravityview_get_form_id( $post->ID );
205
+		$current_form = isset($_POST['form_id']) ? intval($_POST['form_id']) : gravityview_get_form_id($post->ID);
206 206
 
207
-		return self::_get_time_format_for_field( $this->_field_id, $current_form );
207
+		return self::_get_time_format_for_field($this->_field_id, $current_form);
208 208
 	}
209 209
 
210 210
 	/**
@@ -216,17 +216,17 @@  discard block
 block discarded – undo
216 216
 	 * @param int $form_id ID for Gravity Forms form
217 217
 	 * @return string Either "12" or "24". "12" is default.
218 218
 	 */
219
-	static public function _get_time_format_for_field( $field_id, $form_id = 0 ) {
219
+	static public function _get_time_format_for_field($field_id, $form_id = 0) {
220 220
 
221 221
 		// GF defaults to 12, so should we.
222 222
 		$time_format = '12';
223 223
 
224
-		if( $form_id ) {
225
-			$form = GFAPI::get_form( $form_id );
224
+		if ($form_id) {
225
+			$form = GFAPI::get_form($form_id);
226 226
 
227
-			if ( $form ) {
228
-				$field = GFFormsModel::get_field( $form, floor( $field_id ) );
229
-				if ( $field && $field instanceof GF_Field_Time ) {
227
+			if ($form) {
228
+				$field = GFFormsModel::get_field($form, floor($field_id));
229
+				if ($field && $field instanceof GF_Field_Time) {
230 230
 					$field->sanitize_settings(); // Make sure time is set
231 231
 					$time_format = $field->timeFormat;
232 232
 				}
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 		$time_format = $this->_get_time_format();
249 249
 		$field_id = $this->_field_id;
250 250
 
251
-		return self::date_format( $time_format, $field_id );
251
+		return self::date_format($time_format, $field_id);
252 252
 	}
253 253
 
254 254
 	/**
@@ -261,19 +261,19 @@  discard block
 block discarded – undo
261 261
 	 *
262 262
 	 * @return string PHP date format for the time
263 263
 	 */
264
-	static public function date_format( $time_format = '12', $field_id = 0 ) {
264
+	static public function date_format($time_format = '12', $field_id = 0) {
265 265
 
266
-		$field_id_array = explode( '.', $field_id );
266
+		$field_id_array = explode('.', $field_id);
267 267
 
268
-		$field_input_id = isset( $field_id_array[1] ) ? intval( $field_id_array[1] ) : 0;
268
+		$field_input_id = isset($field_id_array[1]) ? intval($field_id_array[1]) : 0;
269 269
 
270 270
 		$default = 'h:i A';
271 271
 
272 272
 		// This doesn't take into account 24-hour
273
-		switch( $field_input_id ) {
273
+		switch ($field_input_id) {
274 274
 			// Hours
275 275
 			case 1:
276
-				return ( $time_format === '12' ) ? 'h' : 'H';
276
+				return ($time_format === '12') ? 'h' : 'H';
277 277
 				break;
278 278
 			// Minutes
279 279
 			case 2:
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 				break;
286 286
 			// Full time field
287 287
 			case 0:
288
-				return ( $time_format === '12' ) ? $default : 'H:i';
288
+				return ($time_format === '12') ? $default : 'H:i';
289 289
 				break;
290 290
 		}
291 291
 
Please login to merge, or discard this patch.
includes/fields/website.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@  discard block
 block discarded – undo
7 7
 
8 8
 	var $name = 'website';
9 9
 
10
-	function field_options( $field_options, $template_id = '', $field_id = '', $context = '', $input_type = '' ) {
10
+	function field_options($field_options, $template_id = '', $field_id = '', $context = '', $input_type = '') {
11 11
 
12 12
 		// It makes no sense to use this as the link.
13
-		unset( $field_options['show_as_link'] );
13
+		unset($field_options['show_as_link']);
14 14
 
15
-		if( 'edit' === $context ) {
15
+		if ('edit' === $context) {
16 16
 			return $field_options;
17 17
 		}
18 18
 
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
 		 */
22 22
 		$field_options['anchor_text'] = array(
23 23
 			'type' => 'text',
24
-			'label' => __( 'Link Text:', 'gravityview' ),
25
-			'desc' => __( 'Define custom link text. Leave blank to display the URL', 'gravityview' ),
24
+			'label' => __('Link Text:', 'gravityview'),
25
+			'desc' => __('Define custom link text. Leave blank to display the URL', 'gravityview'),
26 26
 			'value' => '',
27 27
 			'merge_tags' => 'force',
28 28
 		);
@@ -30,15 +30,15 @@  discard block
 block discarded – undo
30 30
 		$field_options['truncatelink'] = array(
31 31
 			'type' => 'checkbox',
32 32
 			'value' => true,
33
-			'label' => __( 'Shorten Link Display', 'gravityview' ),
34
-			'tooltip' => __( 'Only show the domain for a URL instead of the whole link.', 'gravityview' ),
35
-			'desc' => __( 'Don’t show the full URL, only show the domain.', 'gravityview' )
33
+			'label' => __('Shorten Link Display', 'gravityview'),
34
+			'tooltip' => __('Only show the domain for a URL instead of the whole link.', 'gravityview'),
35
+			'desc' => __('Don’t show the full URL, only show the domain.', 'gravityview')
36 36
 		);
37 37
 
38 38
 		$field_options['open_same_window'] = array(
39 39
 			'type' => 'checkbox',
40 40
 			'value' => false,
41
-			'label' => __( 'Open link in the same window?', 'gravityview' ),
41
+			'label' => __('Open link in the same window?', 'gravityview'),
42 42
 		);
43 43
 
44 44
 		return $field_options;
Please login to merge, or discard this patch.
includes/lib/class-gamajo-template-loader.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -76,15 +76,15 @@  discard block
 block discarded – undo
76 76
 	 *
77 77
 	 * @return string
78 78
 	 */
79
-	public function get_template_part( $slug, $name = null, $load = true ) {
79
+	public function get_template_part($slug, $name = null, $load = true) {
80 80
 		// Execute code for this part
81
-		do_action( 'get_template_part_' . $slug, $slug, $name );
81
+		do_action('get_template_part_'.$slug, $slug, $name);
82 82
 
83 83
 		// Get files names of templates, for given slug and name.
84
-		$templates = $this->get_template_file_names( $slug, $name );
84
+		$templates = $this->get_template_file_names($slug, $name);
85 85
 
86 86
 		// Return the part that is found
87
-		return $this->locate_template( $templates, $load, false );
87
+		return $this->locate_template($templates, $load, false);
88 88
 	}
89 89
 
90 90
 	/**
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
 	 *
98 98
 	 * @return array
99 99
 	 */
100
-	protected function get_template_file_names( $slug, $name ) {
100
+	protected function get_template_file_names($slug, $name) {
101 101
 		$templates = array();
102
-		if ( isset( $name ) ) {
103
-			$templates[] = $slug . '-' . $name . '.php';
102
+		if (isset($name)) {
103
+			$templates[] = $slug.'-'.$name.'.php';
104 104
 		}
105
-		$templates[] = $slug . '.php';
105
+		$templates[] = $slug.'.php';
106 106
 
107 107
 		/**
108 108
 		 * Allow template choices to be filtered.
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 		 * @param string $slug Template slug.
117 117
 		 * @param string $name Template name.
118 118
 		 */
119
-		return apply_filters( $this->filter_prefix . '_get_template_part', $templates, $slug, $name );
119
+		return apply_filters($this->filter_prefix.'_get_template_part', $templates, $slug, $name);
120 120
 	}
121 121
 
122 122
 	/**
@@ -137,30 +137,30 @@  discard block
 block discarded – undo
137 137
 	 *
138 138
 	 * @return string The template filename if one is located.
139 139
 	 */
140
-	public function locate_template( $template_names, $load = false, $require_once = true ) {
140
+	public function locate_template($template_names, $load = false, $require_once = true) {
141 141
 		// No file found yet
142 142
 		$located = false;
143 143
 
144 144
 		// Remove empty entries
145
-		$template_names = array_filter( (array) $template_names );
145
+		$template_names = array_filter((array)$template_names);
146 146
 		$template_paths = $this->get_template_paths();
147 147
 
148 148
 		// Try to find a template file
149
-		foreach ( $template_names as $template_name ) {
149
+		foreach ($template_names as $template_name) {
150 150
 			// Trim off any slashes from the template name
151
-			$template_name = ltrim( $template_name, '/' );
151
+			$template_name = ltrim($template_name, '/');
152 152
 
153 153
 			// Try locating this template file by looping through the template paths
154
-			foreach ( $template_paths as $template_path ) {
155
-				if ( file_exists( $template_path . $template_name ) ) {
156
-					$located = $template_path . $template_name;
154
+			foreach ($template_paths as $template_path) {
155
+				if (file_exists($template_path.$template_name)) {
156
+					$located = $template_path.$template_name;
157 157
 					break 2;
158 158
 				}
159 159
 			}
160 160
 		}
161 161
 
162
-		if ( $load && $located ) {
163
-			load_template( $located, $require_once );
162
+		if ($load && $located) {
163
+			load_template($located, $require_once);
164 164
 		}
165 165
 
166 166
 		return $located;
@@ -178,16 +178,16 @@  discard block
 block discarded – undo
178 178
 	 * @return mixed|void
179 179
 	 */
180 180
 	protected function get_template_paths() {
181
-		$theme_directory = trailingslashit( $this->theme_template_directory );
181
+		$theme_directory = trailingslashit($this->theme_template_directory);
182 182
 
183 183
 		$file_paths = array(
184
-			10  => trailingslashit( get_template_directory() ) . $theme_directory,
184
+			10  => trailingslashit(get_template_directory()).$theme_directory,
185 185
 			100 => $this->get_templates_dir()
186 186
 		);
187 187
 
188 188
 		// Only add this conditionally, so non-child themes don't redundantly check active theme twice.
189
-		if ( is_child_theme() ) {
190
-			$file_paths[1] = trailingslashit( get_stylesheet_directory() ) . $theme_directory;
189
+		if (is_child_theme()) {
190
+			$file_paths[1] = trailingslashit(get_stylesheet_directory()).$theme_directory;
191 191
 		}
192 192
 
193 193
 		/**
@@ -197,12 +197,12 @@  discard block
 block discarded – undo
197 197
 		 *
198 198
 		 * @param array $var Default is directory in child theme at index 1, parent theme at 10, and plugin at 100.
199 199
 		 */
200
-		$file_paths = apply_filters( $this->filter_prefix . '_template_paths', $file_paths );
200
+		$file_paths = apply_filters($this->filter_prefix.'_template_paths', $file_paths);
201 201
 
202 202
 		// sort the file paths based on priority
203
-		ksort( $file_paths, SORT_NUMERIC );
203
+		ksort($file_paths, SORT_NUMERIC);
204 204
 
205
-		return array_map( 'trailingslashit', $file_paths );
205
+		return array_map('trailingslashit', $file_paths);
206 206
 	}
207 207
 
208 208
 	/**
@@ -215,6 +215,6 @@  discard block
 block discarded – undo
215 215
 	 * @return string
216 216
 	 */
217 217
 	protected function get_templates_dir() {
218
-		return trailingslashit( $this->plugin_directory ) . $this->plugin_template_directory;
218
+		return trailingslashit($this->plugin_directory).$this->plugin_template_directory;
219 219
 	}
220 220
 }
Please login to merge, or discard this patch.
includes/load-plugin-and-theme-hooks.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Include files that load plugin and theme hooks
4
- *
5
- * @file      load-plugin-and-theme-hooks.php
6
- * @package   GravityView
7
- * @license   GPL2+
8
- * @author    Katz Web Services, Inc.
9
- * @link      http://gravityview.co
10
- * @copyright Copyright 2015, Katz Web Services, Inc.
11
- *
12
- * @since 1.15.2
13
- */
3
+	 * Include files that load plugin and theme hooks
4
+	 *
5
+	 * @file      load-plugin-and-theme-hooks.php
6
+	 * @package   GravityView
7
+	 * @license   GPL2+
8
+	 * @author    Katz Web Services, Inc.
9
+	 * @link      http://gravityview.co
10
+	 * @copyright Copyright 2015, Katz Web Services, Inc.
11
+	 *
12
+	 * @since 1.15.2
13
+	 */
14 14
 
15 15
 
16 16
 /** @define "GRAVITYVIEW_DIR" "../" */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@
 block discarded – undo
14 14
 
15 15
 
16 16
 /** @define "GRAVITYVIEW_DIR" "../" */
17
-$include_path = GRAVITYVIEW_DIR . 'includes/plugin-and-theme-hooks/';
17
+$include_path = GRAVITYVIEW_DIR.'includes/plugin-and-theme-hooks/';
18 18
 
19 19
 // Abstract class
20
-require $include_path . 'abstract-gravityview-plugin-and-theme-hooks.php';
20
+require $include_path.'abstract-gravityview-plugin-and-theme-hooks.php';
21 21
 
22 22
 // Load all plugin and theme files automatically
23
-foreach ( glob( $include_path . 'class-gravityview-{plugin,theme}-hooks-*.php', GLOB_BRACE ) as $gv_hooks_filename ) {
23
+foreach (glob($include_path.'class-gravityview-{plugin,theme}-hooks-*.php', GLOB_BRACE) as $gv_hooks_filename) {
24 24
 	include $gv_hooks_filename;
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
plugin-and-theme-hooks/class-gravityview-plugin-hooks-yoast-seo.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,16 +56,16 @@  discard block
 block discarded – undo
56 56
 
57 57
 		parent::add_hooks();
58 58
 
59
-		if( gravityview_is_admin_page() ) {
59
+		if (gravityview_is_admin_page()) {
60 60
 
61 61
 				// Make Yoast metabox go down to the bottom please.
62
-			add_filter( 'wpseo_metabox_prio', array( $this, '__return_low' ) );
62
+			add_filter('wpseo_metabox_prio', array($this, '__return_low'));
63 63
 
64 64
 			// Prevent the SEO from being checked. Eesh.
65
-			add_filter( 'wpseo_use_page_analysis', '__return_false' );
65
+			add_filter('wpseo_use_page_analysis', '__return_false');
66 66
 
67 67
 			// WordPress SEO Plugin
68
-			add_filter( 'option_wpseo_titles', array( $this, 'hide_wordpress_seo_metabox' ) );
68
+			add_filter('option_wpseo_titles', array($this, 'hide_wordpress_seo_metabox'));
69 69
 		}
70 70
 	}
71 71
 
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
 	 * @param  array       $options WP SEO options array
80 80
 	 * @return array               Modified array if on post-new.php
81 81
 	 */
82
-	function hide_wordpress_seo_metabox( $options = array() ) {
82
+	function hide_wordpress_seo_metabox($options = array()) {
83 83
 		global $pagenow;
84 84
 
85 85
 		// New View page
86
-		if( $pagenow === 'post-new.php' ) {
86
+		if ($pagenow === 'post-new.php') {
87 87
 			$options['hideeditbox-gravityview'] = true;
88 88
 		}
89 89
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 * @param string $existing Existing priority. Default: `high`
100 100
 	 * @return string Returns 'low'
101 101
 	 */
102
-	function __return_low( $existing = 'high' ) {
102
+	function __return_low($existing = 'high') {
103 103
 		return 'low';
104 104
 	}
105 105
 }
Please login to merge, or discard this patch.
includes/plugin-and-theme-hooks/class-gravityview-theme-hooks-woothemes.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
 		parent::add_hooks();
67 67
 
68
-		add_action( 'admin_menu', array( $this, 'remove_meta_box' ), 11 );
68
+		add_action('admin_menu', array($this, 'remove_meta_box'), 11);
69 69
 	}
70 70
 
71 71
 	/**
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
 	function remove_meta_box() {
76 76
 		global $pagenow;
77 77
 
78
-		$gv_page = gravityview_is_admin_page( '', 'single' );
78
+		$gv_page = gravityview_is_admin_page('', 'single');
79 79
 
80 80
 		// New View or Edit View page
81
-		if( $gv_page && $pagenow === 'post-new.php' ) {
82
-			remove_meta_box( 'woothemes-settings', 'gravityview', 'normal' );
81
+		if ($gv_page && $pagenow === 'post-new.php') {
82
+			remove_meta_box('woothemes-settings', 'gravityview', 'normal');
83 83
 		}
84 84
 	}
85 85
 
Please login to merge, or discard this patch.
includes/presets/business-data/class-gravityview-preset-business-data.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,15 +21,15 @@
 block discarded – undo
21 21
 		$settings = array(
22 22
 			'slug'          => 'table',
23 23
 			'type'          => 'preset',
24
-			'label'         => __( 'Business Data', 'gravityview' ),
25
-			'description'   => __( 'Display business information in a table.', 'gravityview' ),
26
-			'logo'          => plugins_url( 'includes/presets/business-data/logo-business-data.png', GRAVITYVIEW_FILE ),
24
+			'label'         => __('Business Data', 'gravityview'),
25
+			'description'   => __('Display business information in a table.', 'gravityview'),
26
+			'logo'          => plugins_url('includes/presets/business-data/logo-business-data.png', GRAVITYVIEW_FILE),
27 27
 			'preview'       => 'http://demo.gravityview.co/blog/view/business-table/',
28
-			'preset_form'   => GRAVITYVIEW_DIR . 'includes/presets/business-data/form-business-data.xml',
29
-			'preset_fields' => GRAVITYVIEW_DIR . 'includes/presets/business-data/fields-business-data.xml'
28
+			'preset_form'   => GRAVITYVIEW_DIR.'includes/presets/business-data/form-business-data.xml',
29
+			'preset_fields' => GRAVITYVIEW_DIR.'includes/presets/business-data/fields-business-data.xml'
30 30
 		);
31 31
 
32
-		parent::__construct( $id, $settings );
32
+		parent::__construct($id, $settings);
33 33
 	}
34 34
 }
35 35
 
Please login to merge, or discard this patch.
presets/business-listings/class-gravityview-preset-business-listings.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,15 +21,15 @@
 block discarded – undo
21 21
 		$settings = array(
22 22
 			'slug'          => 'list',
23 23
 			'type'          => 'preset',
24
-			'label'         => __( 'Business Listings', 'gravityview' ),
25
-			'description'   => __( 'Display business profiles.', 'gravityview' ),
26
-			'logo'          => plugins_url( 'includes/presets/business-listings/logo-business-listings.png', GRAVITYVIEW_FILE ),
24
+			'label'         => __('Business Listings', 'gravityview'),
25
+			'description'   => __('Display business profiles.', 'gravityview'),
26
+			'logo'          => plugins_url('includes/presets/business-listings/logo-business-listings.png', GRAVITYVIEW_FILE),
27 27
 			'preview'       => 'http://demo.gravityview.co/blog/view/business-listings/',
28
-			'preset_form'   => GRAVITYVIEW_DIR . 'includes/presets/business-listings/form-business-listings.xml',
29
-			'preset_fields' => GRAVITYVIEW_DIR . 'includes/presets/business-listings/fields-business-listings.xml'
28
+			'preset_form'   => GRAVITYVIEW_DIR.'includes/presets/business-listings/form-business-listings.xml',
29
+			'preset_fields' => GRAVITYVIEW_DIR.'includes/presets/business-listings/fields-business-listings.xml'
30 30
 		);
31 31
 
32
-		parent::__construct( $id, $settings );
32
+		parent::__construct($id, $settings);
33 33
 
34 34
 	}
35 35
 }
Please login to merge, or discard this patch.
includes/presets/default-edit/class-gravityview-default-template-edit.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,18 +18,18 @@  discard block
 block discarded – undo
18 18
  */
19 19
 class GravityView_Default_Template_Edit extends GravityView_Template {
20 20
 
21
-	function __construct( $id = 'default_table_edit', $settings = array(), $field_options = array(), $areas = array() ) {
21
+	function __construct($id = 'default_table_edit', $settings = array(), $field_options = array(), $areas = array()) {
22 22
 
23 23
 		$edit_settings = array(
24 24
 			'slug' => 'edit',
25 25
 			'type' => 'internal',
26
-			'label' =>  __( 'Edit Table', 'gravityview' ),
26
+			'label' =>  __('Edit Table', 'gravityview'),
27 27
 			'description' => __('Display items in a table view.', 'gravityview'),
28 28
 			'logo' => plugins_url('includes/presets/default-table/logo-default-table.png', GRAVITYVIEW_FILE),
29 29
 			'css_source' => plugins_url('templates/css/table-view.css', GRAVITYVIEW_FILE),
30 30
 		);
31 31
 
32
-		$settings = wp_parse_args( $settings, $edit_settings );
32
+		$settings = wp_parse_args($settings, $edit_settings);
33 33
 
34 34
 		/**
35 35
 		 * @see  GravityView_Admin_Views::get_default_field_options() for Generic Field Options
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 				'1-1' => array(
43 43
 					array(
44 44
 						'areaid' => 'edit-fields',
45
-						'title' => __('Visible Edit Fields', 'gravityview' )
45
+						'title' => __('Visible Edit Fields', 'gravityview')
46 46
 					)
47 47
 				)
48 48
 			)
49 49
 		);
50 50
 
51 51
 
52
-		parent::__construct( $id, $settings, $field_options, $areas );
52
+		parent::__construct($id, $settings, $field_options, $areas);
53 53
 
54 54
 	}
55 55
 
Please login to merge, or discard this patch.