@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | private function _constants() { |
| 104 | 104 | // Are we in debugging mode? |
| 105 | - if ( isset( $_GET['debugging'] ) ) { |
|
| 105 | + if ( isset( $_GET[ 'debugging' ] ) ) { |
|
| 106 | 106 | define( 'WP2D_DEBUGGING', true ); |
| 107 | 107 | } |
| 108 | 108 | |
@@ -122,15 +122,15 @@ discard block |
||
| 122 | 122 | // fu(ABSPATH); |
| 123 | 123 | printf( |
| 124 | 124 | 'WP (min): %s (%s) => %s' . PHP_EOL . 'PHP (min): %s (%s) => %s' . PHP_EOL, |
| 125 | - $GLOBALS['wp_version'], |
|
| 125 | + $GLOBALS[ 'wp_version' ], |
|
| 126 | 126 | $this->_min_wp, |
| 127 | - version_compare( $GLOBALS['wp_version'], $this->_min_wp, '<' ) ? 'fail' : 'ok', |
|
| 127 | + version_compare( $GLOBALS[ 'wp_version' ], $this->_min_wp, '<' ) ? 'fail' : 'ok', |
|
| 128 | 128 | PHP_VERSION, |
| 129 | 129 | $this->_min_php, |
| 130 | 130 | version_compare( PHP_VERSION, $this->_min_php, '<' ) ? 'fail' : 'ok' |
| 131 | 131 | ); |
| 132 | 132 | // Check for version requirements. |
| 133 | - if ( version_compare( $GLOBALS['wp_version'], $this->_min_wp, '<' ) |
|
| 133 | + if ( version_compare( $GLOBALS[ 'wp_version' ], $this->_min_wp, '<' ) |
|
| 134 | 134 | || version_compare( PHP_VERSION, $this->_min_php, '<' ) ) { |
| 135 | 135 | add_action( 'admin_notices', array( $this, 'deactivate' ) ); |
| 136 | 136 | return false; |
@@ -149,12 +149,12 @@ discard block |
||
| 149 | 149 | deactivate_plugins( plugin_basename( __FILE__ ) ); |
| 150 | 150 | |
| 151 | 151 | // Get rid of the "Plugin activated" message. |
| 152 | - unset( $_GET['activate'] ); |
|
| 152 | + unset( $_GET[ 'activate' ] ); |
|
| 153 | 153 | |
| 154 | 154 | // Then display the admin notice. |
| 155 | 155 | ?> |
| 156 | 156 | <div class="error"> |
| 157 | - <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> |
|
| 157 | + <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> |
|
| 158 | 158 | </div> |
| 159 | 159 | <?php |
| 160 | 160 | } |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | $tags_to_post = array_filter( array( |
| 251 | 251 | ( ( false !== strpos( $tags_to_post_old, 'g' ) ) ? 'global' : null ), |
| 252 | 252 | ( ( false !== strpos( $tags_to_post_old, 'c' ) ) ? 'custom' : null ), |
| 253 | - ( ( false !== strpos( $tags_to_post_old, 'p' ) ) ? 'post' : null ), |
|
| 253 | + ( ( false !== strpos( $tags_to_post_old, 'p' ) ) ? 'post' : null ), |
|
| 254 | 254 | ) ); |
| 255 | 255 | $options->set_option( 'tags_to_post', $tags_to_post ); |
| 256 | 256 | } |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | * @return array Links to display for plugin on plugins page. |
| 305 | 305 | */ |
| 306 | 306 | public function settings_link( $links ) { |
| 307 | - $links[] = '<a href="' . admin_url( 'options-general.php?page=wp_to_diaspora' ) . '">' . __( 'Settings' ) . '</a>'; |
|
| 307 | + $links[ ] = '<a href="' . admin_url( 'options-general.php?page=wp_to_diaspora' ) . '">' . __( 'Settings' ) . '</a>'; |
|
| 308 | 308 | return $links; |
| 309 | 309 | } |
| 310 | 310 | |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | if ( isset( $pod_list->pods ) ) { |
| 328 | 328 | foreach ( $pod_list->pods as $pod ) { |
| 329 | 329 | if ( 'no' === $pod->hidden ) { |
| 330 | - $pods[] = array( |
|
| 330 | + $pods[ ] = array( |
|
| 331 | 331 | 'secure' => $pod->secure, |
| 332 | 332 | 'domain' => $pod->domain, |
| 333 | 333 | ); |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | * @todo esc_html |
| 435 | 435 | */ |
| 436 | 436 | public function check_pod_connection_status_callback() { |
| 437 | - if ( isset( $_REQUEST['debugging'] ) && ! defined( 'WP2D_DEBUGGING' ) ) { |
|
| 437 | + if ( isset( $_REQUEST[ 'debugging' ] ) && ! defined( 'WP2D_DEBUGGING' ) ) { |
|
| 438 | 438 | define( 'WP2D_DEBUGGING', true ); |
| 439 | 439 | } |
| 440 | 440 | |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | if ( true === $status ) { |
| 449 | 449 | wp_send_json_success( $data ); |
| 450 | 450 | } elseif ( false === $status && $this->_load_api()->has_last_error() ) { |
| 451 | - $data['message'] = $this->_load_api()->get_last_error() . ' ' . WP2D_Contextual_Help::get_help_tab_quick_link( $this->_load_api()->get_last_error_object() ); |
|
| 451 | + $data[ 'message' ] = $this->_load_api()->get_last_error() . ' ' . WP2D_Contextual_Help::get_help_tab_quick_link( $this->_load_api()->get_last_error_object() ); |
|
| 452 | 452 | wp_send_json_error( $data ); |
| 453 | 453 | } |
| 454 | 454 | // If $status === null, do nothing. |