| 
                                                        @@ -99,7 +99,7 @@  discard block  | 
                                                    
                                                    
                                                         | 
                                                         | 
                                                         block discarded – undo  | 
                                                    
                                                                                                                                                                                                                    
                                                            | 
                                                                                                                                    99
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    99
                                                                                                                                                                                                 | 
                                                             	 */  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    100
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    100
                                                                                                                                                                                                 | 
                                                             	private function _constants() { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    101
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    101
                                                                                                                                                                                                 | 
                                                             		// Are we in debugging mode?  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    102
                                                                                                                                                                                                 | 
                                                            
                                                                                                                             | 
                                                            -		if ( isset( $_GET['debugging'] ) ) { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                             | 
                                                            
                                                                                                                                    102
                                                                                                                                                                                                 | 
                                                            +		if ( isset( $_GET[ 'debugging' ] ) ) { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    103
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    103
                                                                                                                                                                                                 | 
                                                             			define( 'WP2D_DEBUGGING', true );  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    104
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    104
                                                                                                                                                                                                 | 
                                                             		}  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    105
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    105
                                                                                                                                                                                                 | 
                                                               | 
                                                        
                                                                                                                                                        
                                                         | 
                                                        @@ -117,7 +117,7 @@  discard block  | 
                                                    
                                                    
                                                         | 
                                                         | 
                                                         block discarded – undo  | 
                                                    
                                                                                                                                                                                                                    
                                                            | 
                                                                                                                                    117
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    117
                                                                                                                                                                                                 | 
                                                             	 */  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    118
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    118
                                                                                                                                                                                                 | 
                                                             	private function _version_check() { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    119
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    119
                                                                                                                                                                                                 | 
                                                             		// Check for version requirements.  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    120
                                                                                                                                                                                                 | 
                                                            
                                                                                                                             | 
                                                            -		if ( version_compare( PHP_VERSION, $this->_min_php, '<' ) || version_compare( $GLOBALS['wp_version'], $this->_min_wp, '<' ) ) { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                             | 
                                                            
                                                                                                                                    120
                                                                                                                                                                                                 | 
                                                            +		if ( version_compare( PHP_VERSION, $this->_min_php, '<' ) || version_compare( $GLOBALS[ 'wp_version' ], $this->_min_wp, '<' ) ) { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    121
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    121
                                                                                                                                                                                                 | 
                                                             			add_action( 'admin_notices', [ $this, 'deactivate' ] );  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    122
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    122
                                                                                                                                                                                                 | 
                                                               | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    123
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    123
                                                                                                                                                                                                 | 
                                                             			return false;  | 
                                                        
                                                                                                                                                        
                                                         | 
                                                        @@ -136,12 +136,12 @@  discard block  | 
                                                    
                                                    
                                                         | 
                                                         | 
                                                         block discarded – undo  | 
                                                    
                                                                                                                                                                                                                    
                                                            | 
                                                                                                                                    136
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    136
                                                                                                                                                                                                 | 
                                                             		deactivate_plugins( plugin_basename( __FILE__ ) );  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    137
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    137
                                                                                                                                                                                                 | 
                                                               | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    138
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    138
                                                                                                                                                                                                 | 
                                                             		// Get rid of the "Plugin activated" message.  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    139
                                                                                                                                                                                                 | 
                                                            
                                                                                                                             | 
                                                            -		unset( $_GET['activate'] );  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                             | 
                                                            
                                                                                                                                    139
                                                                                                                                                                                                 | 
                                                            +		unset( $_GET[ 'activate' ] );  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    140
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    140
                                                                                                                                                                                                 | 
                                                               | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    141
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    141
                                                                                                                                                                                                 | 
                                                             		// Then display the admin notice.  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    142
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    142
                                                                                                                                                                                                 | 
                                                             		?>  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    143
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    143
                                                                                                                                                                                                 | 
                                                             		<div class="error">  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    144
                                                                                                                                                                                                 | 
                                                            
                                                                                                                             | 
                                                            -			<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
                                                                                                                                                                                                 | 
                                                            +			<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>  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    145
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    145
                                                                                                                                                                                                 | 
                                                             		</div>  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    146
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    146
                                                                                                                                                                                                 | 
                                                             		<?php  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    147
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    147
                                                                                                                                                                                                 | 
                                                             	}  | 
                                                        
                                                                                                                                                        
                                                         | 
                                                        @@ -260,7 +260,7 @@  discard block  | 
                                                    
                                                    
                                                         | 
                                                         | 
                                                         block discarded – undo  | 
                                                    
                                                                                                                                                                                                                    
                                                            | 
                                                                                                                                    260
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    260
                                                                                                                                                                                                 | 
                                                             	 */  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    261
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    261
                                                                                                                                                                                                 | 
                                                             	public function admin_load_scripts() { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    262
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    262
                                                                                                                                                                                                 | 
                                                             		// Get the enabled post types to load the script for.  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    263
                                                                                                                                                                                                 | 
                                                            
                                                                                                                             | 
                                                            -		$enabled_post_types = WP2D_Options::instance()->get_option( 'enabled_post_types', [] );  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                             | 
                                                            
                                                                                                                                    263
                                                                                                                                                                                                 | 
                                                            +		$enabled_post_types = WP2D_Options::instance()->get_option( 'enabled_post_types', [ ] );  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    264
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    264
                                                                                                                                                                                                 | 
                                                               | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    265
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    265
                                                                                                                                                                                                 | 
                                                             		// Get the screen to find out where we are.  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    266
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    266
                                                                                                                                                                                                 | 
                                                             		$screen = get_current_screen();  | 
                                                        
                                                                                                                                                        
                                                         | 
                                                        @@ -292,7 +292,7 @@  discard block  | 
                                                    
                                                    
                                                         | 
                                                         | 
                                                         block discarded – undo  | 
                                                    
                                                                                                                                                                                                                    
                                                            | 
                                                                                                                                    292
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    292
                                                                                                                                                                                                 | 
                                                             	 * @return array Links to display for plugin on plugins page.  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    293
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    293
                                                                                                                                                                                                 | 
                                                             	 */  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    294
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    294
                                                                                                                                                                                                 | 
                                                             	public function settings_link( $links ) { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    295
                                                                                                                                                                                                 | 
                                                            
                                                                                                                             | 
                                                            -		$links[] = '<a href="' . admin_url( 'options-general.php?page=wp_to_diaspora' ) . '">' . __( 'Settings' ) . '</a>';  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                             | 
                                                            
                                                                                                                                    295
                                                                                                                                                                                                 | 
                                                            +		$links[ ] = '<a href="' . admin_url( 'options-general.php?page=wp_to_diaspora' ) . '">' . __( 'Settings' ) . '</a>';  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    296
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    296
                                                                                                                                                                                                 | 
                                                               | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    297
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    297
                                                                                                                                                                                                 | 
                                                             		return $links;  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    298
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    298
                                                                                                                                                                                                 | 
                                                             	}  | 
                                                        
                                                                                                                                                        
                                                         | 
                                                        @@ -384,7 +384,7 @@  discard block  | 
                                                    
                                                    
                                                         | 
                                                         | 
                                                         block discarded – undo  | 
                                                    
                                                                                                                                                                                                                    
                                                            | 
                                                                                                                                    384
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    384
                                                                                                                                                                                                 | 
                                                             	 * @todo esc_html  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    385
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    385
                                                                                                                                                                                                 | 
                                                             	 */  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    386
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    386
                                                                                                                                                                                                 | 
                                                             	public function check_pod_connection_status_callback() { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    387
                                                                                                                                                                                                 | 
                                                            
                                                                                                                             | 
                                                            -		if ( ! defined( 'WP2D_DEBUGGING' ) && isset( $_REQUEST['debugging'] ) ) { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                             | 
                                                            
                                                                                                                                    387
                                                                                                                                                                                                 | 
                                                            +		if ( ! defined( 'WP2D_DEBUGGING' ) && isset( $_REQUEST[ 'debugging' ] ) ) { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    388
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    388
                                                                                                                                                                                                 | 
                                                             			define( 'WP2D_DEBUGGING', true );  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    389
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    389
                                                                                                                                                                                                 | 
                                                             		}  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    390
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    390
                                                                                                                                                                                                 | 
                                                               | 
                                                        
                                                                                                                                                        
                                                         | 
                                                        @@ -398,7 +398,7 @@  discard block  | 
                                                    
                                                    
                                                         | 
                                                         | 
                                                         block discarded – undo  | 
                                                    
                                                                                                                                                                                                                    
                                                            | 
                                                                                                                                    398
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    398
                                                                                                                                                                                                 | 
                                                             		if ( true === $status ) { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    399
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    399
                                                                                                                                                                                                 | 
                                                             			wp_send_json_success( $data );  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    400
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    400
                                                                                                                                                                                                 | 
                                                             		} elseif ( false === $status && $this->_load_api()->has_last_error() ) { | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    401
                                                                                                                                                                                                 | 
                                                            
                                                                                                                             | 
                                                            -			$data['message'] = $this->_load_api()->get_last_error() . ' ' . WP2D_Contextual_Help::get_help_tab_quick_link( $this->_load_api()->get_last_error_object() );  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                             | 
                                                            
                                                                                                                                    401
                                                                                                                                                                                                 | 
                                                            +			$data[ 'message' ] = $this->_load_api()->get_last_error() . ' ' . WP2D_Contextual_Help::get_help_tab_quick_link( $this->_load_api()->get_last_error_object() );  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    402
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    402
                                                                                                                                                                                                 | 
                                                             			wp_send_json_error( $data );  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    403
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    403
                                                                                                                                                                                                 | 
                                                             		}  | 
                                                        
                                                                                                            
                                                            | 
                                                                                                                                    404
                                                                                                                                                                                                 | 
                                                            
                                                                                                                                    404
                                                                                                                                                                                                 | 
                                                             		// If $status === null, do nothing.  |