Completed
Push — fix_deploy_and_tests ( 9dcc80...ce15f8 )
by Armando
02:09
created
wp-to-diaspora.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	 * @return WP_To_Diaspora Instance of this class.
82 82
 	 */
83 83
 	public static function instance() {
84
-		echo 'before: '; var_dump(self::$_instance);
84
+		echo 'before: '; var_dump( self::$_instance );
85 85
 		if ( ! isset( self::$_instance ) ) {
86 86
 			self::$_instance = new self();
87 87
 			self::$_instance->_constants();
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 				self::$_instance = null;
93 93
 			}
94 94
 		}
95
-		echo 'after: '; var_dump(self::$_instance);
95
+		echo 'after: '; var_dump( self::$_instance );
96 96
 		return self::$_instance;
97 97
 	}
98 98
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	private function _constants() {
105 105
 		// Are we in debugging mode?
106
-		if ( isset( $_GET['debugging'] ) ) {
106
+		if ( isset( $_GET[ 'debugging' ] ) ) {
107 107
 			defined( 'WP2D_DEBUGGING' ) || define( 'WP2D_DEBUGGING', true );
108 108
 		}
109 109
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	private function _version_check() {
123 123
 		// Check for version requirements.
124
-		if ( version_compare( $GLOBALS['wp_version'], $this->_min_wp, '<' )
124
+		if ( version_compare( $GLOBALS[ 'wp_version' ], $this->_min_wp, '<' )
125 125
 			|| version_compare( PHP_VERSION, $this->_min_php, '<' ) ) {
126 126
 			add_action( 'admin_notices', array( $this, 'deactivate' ) );
127 127
 			return false;
@@ -140,12 +140,12 @@  discard block
 block discarded – undo
140 140
 		deactivate_plugins( plugin_basename( __FILE__ ) );
141 141
 
142 142
 		// Get rid of the "Plugin activated" message.
143
-		unset( $_GET['activate'] );
143
+		unset( $_GET[ 'activate' ] );
144 144
 
145 145
 		// Then display the admin notice.
146 146
 		?>
147 147
 		<div class="error">
148
-			<p><?php echo esc_html( sprintf( 'WP to diaspora* requires at least WordPress %1$s (you have %2$s) and PHP %3$s (you have %4$s)!', $this->_min_wp, $GLOBALS['wp_version'], $this->_min_php, PHP_VERSION ) ); ?></p>
148
+			<p><?php echo esc_html( sprintf( 'WP to diaspora* requires at least WordPress %1$s (you have %2$s) and PHP %3$s (you have %4$s)!', $this->_min_wp, $GLOBALS[ 'wp_version' ], $this->_min_php, PHP_VERSION ) ); ?></p>
149 149
 		</div>
150 150
 		<?php
151 151
 	}
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 				$tags_to_post = array_filter( array(
242 242
 					( ( false !== strpos( $tags_to_post_old, 'g' ) ) ? 'global' : null ),
243 243
 					( ( false !== strpos( $tags_to_post_old, 'c' ) ) ? 'custom' : null ),
244
-					( ( false !== strpos( $tags_to_post_old, 'p' ) ) ? 'post'   : null ),
244
+					( ( false !== strpos( $tags_to_post_old, 'p' ) ) ? 'post' : null ),
245 245
 				) );
246 246
 				$options->set_option( 'tags_to_post', $tags_to_post );
247 247
 			}
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 	 * @return array Links to display for plugin on plugins page.
296 296
 	 */
297 297
 	public function settings_link( $links ) {
298
-		$links[] = '<a href="' . admin_url( 'options-general.php?page=wp_to_diaspora' ) . '">' . __( 'Settings' ) . '</a>';
298
+		$links[ ] = '<a href="' . admin_url( 'options-general.php?page=wp_to_diaspora' ) . '">' . __( 'Settings' ) . '</a>';
299 299
 		return $links;
300 300
 	}
301 301
 
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 			if ( isset( $pod_list->pods ) ) {
319 319
 				foreach ( $pod_list->pods as $pod ) {
320 320
 					if ( 'no' === $pod->hidden ) {
321
-						$pods[] = array(
321
+						$pods[ ] = array(
322 322
 							'secure' => $pod->secure,
323 323
 							'domain' => $pod->domain,
324 324
 						);
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 	 * @todo esc_html
426 426
 	 */
427 427
 	public function check_pod_connection_status_callback() {
428
-		if ( isset( $_REQUEST['debugging'] ) && ! defined( 'WP2D_DEBUGGING' ) ) {
428
+		if ( isset( $_REQUEST[ 'debugging' ] ) && ! defined( 'WP2D_DEBUGGING' ) ) {
429 429
 			define( 'WP2D_DEBUGGING', true );
430 430
 		}
431 431
 
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
 		if ( true === $status ) {
440 440
 			wp_send_json_success( $data );
441 441
 		} elseif ( false === $status && $this->_load_api()->has_last_error() ) {
442
-			$data['message'] = $this->_load_api()->get_last_error() . ' ' . WP2D_Contextual_Help::get_help_tab_quick_link( $this->_load_api()->get_last_error_object() );
442
+			$data[ 'message' ] = $this->_load_api()->get_last_error() . ' ' . WP2D_Contextual_Help::get_help_tab_quick_link( $this->_load_api()->get_last_error_object() );
443 443
 			wp_send_json_error( $data );
444 444
 		}
445 445
 		// If $status === null, do nothing.
Please login to merge, or discard this patch.