@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | private function _constants() { |
100 | 100 | // Are we in debugging mode? |
101 | - if ( isset( $_GET['debugging'] ) ) { |
|
101 | + if ( isset( $_GET[ 'debugging' ] ) ) { |
|
102 | 102 | define( 'WP2D_DEBUGGING', true ); |
103 | 103 | } |
104 | 104 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | private function _version_check() { |
118 | 118 | // Check for version requirements. |
119 | - if ( version_compare( $GLOBALS['wp_version'], $this->_min_wp, '<' ) |
|
119 | + if ( version_compare( $GLOBALS[ 'wp_version' ], $this->_min_wp, '<' ) |
|
120 | 120 | || version_compare( PHP_VERSION, $this->_min_php, '<' ) ) { |
121 | 121 | add_action( 'admin_notices', array( $this, 'deactivate' ) ); |
122 | 122 | return false; |
@@ -135,12 +135,12 @@ discard block |
||
135 | 135 | deactivate_plugins( plugin_basename( __FILE__ ) ); |
136 | 136 | |
137 | 137 | // Get rid of the "Plugin activated" message. |
138 | - unset( $_GET['activate'] ); |
|
138 | + unset( $_GET[ 'activate' ] ); |
|
139 | 139 | |
140 | 140 | // Then display the admin notice. |
141 | 141 | ?> |
142 | 142 | <div class="error"> |
143 | - <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> |
|
143 | + <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> |
|
144 | 144 | </div> |
145 | 145 | <?php |
146 | 146 | } |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | $tags_to_post = array_filter( array( |
237 | 237 | ( ( false !== strpos( $tags_to_post_old, 'g' ) ) ? 'global' : null ), |
238 | 238 | ( ( false !== strpos( $tags_to_post_old, 'c' ) ) ? 'custom' : null ), |
239 | - ( ( false !== strpos( $tags_to_post_old, 'p' ) ) ? 'post' : null ), |
|
239 | + ( ( false !== strpos( $tags_to_post_old, 'p' ) ) ? 'post' : null ), |
|
240 | 240 | ) ); |
241 | 241 | $options->set_option( 'tags_to_post', $tags_to_post ); |
242 | 242 | } |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | * @return array Links to display for plugin on plugins page. |
291 | 291 | */ |
292 | 292 | public function settings_link( $links ) { |
293 | - $links[] = '<a href="' . admin_url( 'options-general.php?page=wp_to_diaspora' ) . '">' . __( 'Settings' ) . '</a>'; |
|
293 | + $links[ ] = '<a href="' . admin_url( 'options-general.php?page=wp_to_diaspora' ) . '">' . __( 'Settings' ) . '</a>'; |
|
294 | 294 | return $links; |
295 | 295 | } |
296 | 296 | |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | if ( isset( $pod_list->pods ) ) { |
314 | 314 | foreach ( $pod_list->pods as $pod ) { |
315 | 315 | if ( 'no' === $pod->hidden ) { |
316 | - $pods[] = array( |
|
316 | + $pods[ ] = array( |
|
317 | 317 | 'secure' => $pod->secure, |
318 | 318 | 'domain' => $pod->domain, |
319 | 319 | ); |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | * @todo esc_html |
421 | 421 | */ |
422 | 422 | public function check_pod_connection_status_callback() { |
423 | - if ( isset( $_REQUEST['debugging'] ) && ! defined( 'WP2D_DEBUGGING' ) ) { |
|
423 | + if ( isset( $_REQUEST[ 'debugging' ] ) && ! defined( 'WP2D_DEBUGGING' ) ) { |
|
424 | 424 | define( 'WP2D_DEBUGGING', true ); |
425 | 425 | } |
426 | 426 | |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | if ( true === $status ) { |
435 | 435 | wp_send_json_success( $data ); |
436 | 436 | } elseif ( false === $status && $this->_load_api()->has_last_error() ) { |
437 | - $data['message'] = $this->_load_api()->get_last_error() . ' ' . WP2D_Contextual_Help::get_help_tab_quick_link( $this->_load_api()->get_last_error_object() ); |
|
437 | + $data[ 'message' ] = $this->_load_api()->get_last_error() . ' ' . WP2D_Contextual_Help::get_help_tab_quick_link( $this->_load_api()->get_last_error_object() ); |
|
438 | 438 | wp_send_json_error( $data ); |
439 | 439 | } |
440 | 440 | // If $status === null, do nothing. |