Completed
Pull Request — master (#900)
by Zack
11:12 queued 07:04
created
gravityview.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 */
91 91
 	public static function getInstance() {
92 92
 
93
-		if( empty( self::$instance ) ) {
93
+		if ( empty( self::$instance ) ) {
94 94
 			self::$instance = new self;
95 95
 		}
96 96
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
 		self::require_files();
103 103
 
104
-		if( ! GravityView_Compatibility::is_valid() ) {
104
+		if ( ! GravityView_Compatibility::is_valid() ) {
105 105
 			return;
106 106
 		}
107 107
 
@@ -116,14 +116,14 @@  discard block
 block discarded – undo
116 116
 	 */
117 117
 	private static function require_files() {
118 118
 		require_once( GRAVITYVIEW_DIR . 'includes/helper-functions.php' );
119
-		require_once( GRAVITYVIEW_DIR . 'includes/class-common.php');
120
-		require_once( GRAVITYVIEW_DIR . 'includes/connector-functions.php');
119
+		require_once( GRAVITYVIEW_DIR . 'includes/class-common.php' );
120
+		require_once( GRAVITYVIEW_DIR . 'includes/connector-functions.php' );
121 121
 		require_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-compatibility.php' );
122 122
 		require_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-roles-capabilities.php' );
123 123
 		require_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-admin-notices.php' );
124 124
 		require_once( GRAVITYVIEW_DIR . 'includes/class-admin.php' );
125
-		require_once( GRAVITYVIEW_DIR . 'includes/class-post-types.php');
126
-		require_once( GRAVITYVIEW_DIR . 'includes/class-cache.php');
125
+		require_once( GRAVITYVIEW_DIR . 'includes/class-post-types.php' );
126
+		require_once( GRAVITYVIEW_DIR . 'includes/class-cache.php' );
127 127
 	}
128 128
 
129 129
 	/**
@@ -156,22 +156,22 @@  discard block
 block discarded – undo
156 156
 		}
157 157
 
158 158
 		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-entry-approval-status.php' );
159
-		include_once( GRAVITYVIEW_DIR .'includes/class-gravityview-entry-approval.php' );
159
+		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-entry-approval.php' );
160 160
 
161
-		include_once( GRAVITYVIEW_DIR .'includes/class-gravityview-entry-notes.php' );
162
-		include_once( GRAVITYVIEW_DIR .'includes/load-plugin-and-theme-hooks.php' );
161
+		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-entry-notes.php' );
162
+		include_once( GRAVITYVIEW_DIR . 'includes/load-plugin-and-theme-hooks.php' );
163 163
 
164 164
 		// Load Extensions
165 165
 		// @todo: Convert to a scan of the directory or a method where this all lives
166
-		include_once( GRAVITYVIEW_DIR .'includes/extensions/edit-entry/class-edit-entry.php' );
167
-		include_once( GRAVITYVIEW_DIR .'includes/extensions/delete-entry/class-delete-entry.php' );
168
-		include_once( GRAVITYVIEW_DIR .'includes/extensions/entry-notes/class-gravityview-field-notes.php' );
166
+		include_once( GRAVITYVIEW_DIR . 'includes/extensions/edit-entry/class-edit-entry.php' );
167
+		include_once( GRAVITYVIEW_DIR . 'includes/extensions/delete-entry/class-delete-entry.php' );
168
+		include_once( GRAVITYVIEW_DIR . 'includes/extensions/entry-notes/class-gravityview-field-notes.php' );
169 169
 
170 170
 		// Load WordPress Widgets
171
-		include_once( GRAVITYVIEW_DIR .'includes/wordpress-widgets/register-wordpress-widgets.php' );
171
+		include_once( GRAVITYVIEW_DIR . 'includes/wordpress-widgets/register-wordpress-widgets.php' );
172 172
 
173 173
 		// Load GravityView Widgets
174
-		include_once( GRAVITYVIEW_DIR .'includes/widgets/register-gravityview-widgets.php' );
174
+		include_once( GRAVITYVIEW_DIR . 'includes/widgets/register-gravityview-widgets.php' );
175 175
 
176 176
 		// Add oEmbed
177 177
 		include_once( GRAVITYVIEW_DIR . 'includes/class-oembed.php' );
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 		include_once( GRAVITYVIEW_DIR . 'includes/class-frontend-views.php' );
185 185
 		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-admin-bar.php' );
186 186
 		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-entry-list.php' );
187
-		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-merge-tags.php'); /** @since 1.8.4 */
187
+		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-merge-tags.php' ); /** @since 1.8.4 */
188 188
 		include_once( GRAVITYVIEW_DIR . 'includes/class-data.php' );
189 189
 		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-shortcode.php' );
190 190
 		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-entry-link-shortcode.php' );
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 	 * @return bool
200 200
 	 */
201 201
 	public static function is_network_activated() {
202
-		return is_multisite() && ( function_exists('is_plugin_active_for_network') && is_plugin_active_for_network( 'gravityview/gravityview.php' ) );
202
+		return is_multisite() && ( function_exists( 'is_plugin_active_for_network' ) && is_plugin_active_for_network( 'gravityview/gravityview.php' ) );
203 203
 	}
204 204
 
205 205
 
@@ -220,12 +220,12 @@  discard block
 block discarded – undo
220 220
 
221 221
 			if ( php_sapi_name() == 'cli' ) {
222 222
 				printf( __( "GravityView requires PHP Version %s or newer. You're using Version %s. Please ask your host to upgrade your server's PHP.", 'gravityview' ),
223
-					GV_FUTURE_MIN_PHP_VERSION , phpversion() );
223
+					GV_FUTURE_MIN_PHP_VERSION, phpversion() );
224 224
 			} else {
225 225
 				printf( '<body style="padding: 0; margin: 0; font-family: -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Oxygen-Sans, Ubuntu, Cantarell, \'Helvetica Neue\', sans-serif;">' );
226 226
 				printf( '<img src="' . plugins_url( 'assets/images/astronaut-200x263.png', GRAVITYVIEW_FILE ) . '" alt="The GravityView Astronaut Says:" style="float: left; height: 60px; margin-right : 10px;" />' );
227 227
 				printf( __( "%sGravityView requires PHP Version %s or newer.%s \n\nYou're using Version %s. Please ask your host to upgrade your server's PHP.", 'gravityview' ),
228
-					'<h3 style="font-size:16px; margin: 0 0 8px 0;">', GV_FUTURE_MIN_PHP_VERSION , "</h3>\n\n", $version );
228
+					'<h3 style="font-size:16px; margin: 0 0 8px 0;">', GV_FUTURE_MIN_PHP_VERSION, "</h3>\n\n", $version );
229 229
 				printf( '</body>' );
230 230
 			}
231 231
 
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 	 * @since 1.7.5.1
296 296
 	 */
297 297
 	public static function include_widget_class() {
298
-		include_once( GRAVITYVIEW_DIR .'includes/widgets/class-gravityview-widget.php' );
298
+		include_once( GRAVITYVIEW_DIR . 'includes/widgets/class-gravityview-widget.php' );
299 299
 	}
300 300
 
301 301
 
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 		}
318 318
 		if ( ! $loaded ) {
319 319
 			$locale = apply_filters( 'plugin_locale', get_locale(), 'gravityview' );
320
-			$mofile = dirname( __FILE__ ) . '/languages/gravityview-'. $locale .'.mo';
320
+			$mofile = dirname( __FILE__ ) . '/languages/gravityview-' . $locale . '.mo';
321 321
 			load_textdomain( 'gravityview', $mofile );
322 322
 		}
323 323
 
@@ -354,12 +354,12 @@  discard block
 block discarded – undo
354 354
 	 */
355 355
 	public function frontend_actions( $force = false ) {
356 356
 
357
-		if( self::is_admin() && ! $force ) { return; }
357
+		if ( self::is_admin() && ! $force ) { return; }
358 358
 
359 359
 		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-image.php' );
360
-		include_once( GRAVITYVIEW_DIR .'includes/class-template.php' );
361
-		include_once( GRAVITYVIEW_DIR .'includes/class-api.php' );
362
-		include_once( GRAVITYVIEW_DIR .'includes/class-frontend-views.php' );
360
+		include_once( GRAVITYVIEW_DIR . 'includes/class-template.php' );
361
+		include_once( GRAVITYVIEW_DIR . 'includes/class-api.php' );
362
+		include_once( GRAVITYVIEW_DIR . 'includes/class-frontend-views.php' );
363 363
 		include_once( GRAVITYVIEW_DIR . 'includes/class-gravityview-change-entry-creator.php' );
364 364
 
365 365
 
@@ -384,8 +384,8 @@  discard block
 block discarded – undo
384 384
 	 */
385 385
 	public static function get_default_widget_areas() {
386 386
 		$default_areas = array(
387
-			array( '1-1' => array( array( 'areaid' => 'top', 'title' => __('Top', 'gravityview' ) , 'subtitle' => '' ) ) ),
388
-			array( '1-2' => array( array( 'areaid' => 'left', 'title' => __('Left', 'gravityview') , 'subtitle' => '' ) ), '2-2' => array( array( 'areaid' => 'right', 'title' => __('Right', 'gravityview') , 'subtitle' => '' ) ) ),
387
+			array( '1-1' => array( array( 'areaid' => 'top', 'title' => __( 'Top', 'gravityview' ), 'subtitle' => '' ) ) ),
388
+			array( '1-2' => array( array( 'areaid' => 'left', 'title' => __( 'Left', 'gravityview' ), 'subtitle' => '' ) ), '2-2' => array( array( 'areaid' => 'right', 'title' => __( 'Right', 'gravityview' ), 'subtitle' => '' ) ) ),
389 389
 		);
390 390
 
391 391
 		/**
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
      * @param mixed $data Additional data to display
404 404
      * @return void
405 405
      */
406
-    public static function log_debug( $message, $data = null ){
406
+    public static function log_debug( $message, $data = null ) {
407 407
 	    /**
408 408
 	     * @action `gravityview_log_debug` Log a debug message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output
409 409
 	     * @param string $message Message to display
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
      * @param  string $message log message
418 418
      * @return void
419 419
      */
420
-    public static function log_error( $message, $data = null ){
420
+    public static function log_error( $message, $data = null ) {
421 421
 	    /**
422 422
 	     * @action `gravityview_log_error` Log an error message that shows up in the Gravity Forms Logging Addon and also the Debug Bar plugin output
423 423
 	     * @param string $message Error message to display
@@ -428,4 +428,4 @@  discard block
 block discarded – undo
428 428
 
429 429
 } // end class GravityView_Plugin
430 430
 
431
-add_action('plugins_loaded', array('GravityView_Plugin', 'getInstance'), 1);
431
+add_action( 'plugins_loaded', array( 'GravityView_Plugin', 'getInstance' ), 1 );
Please login to merge, or discard this patch.