| @@ -27,9 +27,9 @@ | ||
| 27 | 27 | if ( ! empty( $_GET['disconnect'] ) ) { |
| 28 | 28 | if ( Jetpack::is_connection_ready() ) { |
| 29 | 29 | Jetpack::disconnect(); |
| 30 | 30 | wp_safe_redirect( Jetpack::admin_url() ); |
| 31 | - exit; | |
| 31 | + exit( 0 ); | |
| 32 | 32 | } |
| 33 | 33 | } |
| 34 | 34 | } |
| 35 | 35 | |
| @@ -44,9 +44,9 @@ | ||
| 44 | 44 | $support_url = Jetpack::is_development_version() |
| 45 | 45 | ? Redirect::get_url( 'jetpack-contact-support-beta-group' ) |
| 46 | 46 | : Redirect::get_url( 'jetpack-contact-support' ); |
| 47 | 47 | |
| 48 | - $cxntests = new Jetpack_Cxn_Tests(); | |
| 48 | + $cxntests = new Automattic\Jetpack\Connection\Connection_Health_Tests(); | |
| 49 | 49 | ?> |
| 50 | 50 | <div class="wrap"> |
| 51 | 51 | <div class="jp-static-block"> |
| 52 | 52 | <h2><?php esc_html_e( 'Debugging Center', 'jetpack' ); ?></h2> |
| @@ -87,9 +87,9 @@ | ||
| 87 | 87 | <p><?php esc_html_e( 'It may be caused by one of these issues, which you can diagnose yourself:', 'jetpack' ); ?></p> |
| 88 | 88 | <ol> |
| 89 | 89 | <li><?php esc_html_e( 'A known issue.', 'jetpack' ); ?> |
| 90 | 90 | <?php |
| 91 | - echo sprintf( | |
| 91 | + printf( | |
| 92 | 92 | wp_kses( |
| 93 | 93 | /* translators: URLs to Jetpack support pages. */ |
| 94 | 94 | __( 'Some themes and plugins have <a href="%1$s" target="_blank" rel="noopener noreferrer">known conflicts</a> with Jetpack – check the list. (You can also browse the <a href="%2$s" target="_blank" rel="noopener noreferrer">Jetpack support pages</a> or <a href="%3$s" target="_blank" rel="noopener noreferrer">Jetpack support forum</a> to see if others have experienced and solved the problem.)', 'jetpack' ), |
| 95 | 95 | array( |
| @@ -126,9 +126,9 @@ | ||
| 126 | 126 | </li> |
| 127 | 127 | <li> |
| 128 | 128 | <?php esc_html_e( 'A problem with your XML-RPC file.', 'jetpack' ); ?> |
| 129 | 129 | <?php |
| 130 | - echo sprintf( | |
| 130 | + printf( | |
| 131 | 131 | wp_kses( |
| 132 | 132 | /* translators: The URL to the site's xmlrpc.php file. */ |
| 133 | 133 | __( 'Load your <a href="%s">XML-RPC file</a>. It should say “XML-RPC server accepts POST requests only.” on a line by itself.', 'jetpack' ), |
| 134 | 134 | array( 'a' => array( 'href' => array() ) ) |
| @@ -145,9 +145,9 @@ | ||
| 145 | 145 | <?php if ( current_user_can( 'jetpack_disconnect' ) && Jetpack::is_connection_ready() ) : ?> |
| 146 | 146 | <li> |
| 147 | 147 | <?php esc_html_e( 'A connection problem with WordPress.com.', 'jetpack' ); ?> |
| 148 | 148 | <?php |
| 149 | - echo sprintf( | |
| 149 | + printf( | |
| 150 | 150 | wp_kses( |
| 151 | 151 | /* translators: URL to disconnect and reconnect Jetpack. */ |
| 152 | 152 | __( 'Jetpack works by connecting to WordPress.com for a lot of features. Sometimes, when the connection gets messed up, you need to disconnect and reconnect to get things working properly. <a href="%s">Disconnect from WordPress.com</a>', 'jetpack' ), |
| 153 | 153 | array( |
| @@ -182,9 +182,9 @@ | ||
| 182 | 182 | <?php |
| 183 | 183 | /** |
| 184 | 184 | * Offload to new WordPress debug data. |
| 185 | 185 | */ |
| 186 | - echo sprintf( | |
| 186 | + printf( | |
| 187 | 187 | wp_kses( |
| 188 | 188 | /* translators: URL for Jetpack support. URL for WordPress's Site Health */ |
| 189 | 189 | __( '<a href="%1$s">Contact our Happiness team</a>. When you do, please include the <a href="%2$s">full debug information from your site</a>.', 'jetpack' ), |
| 190 | 190 | array( 'a' => array( 'href' => array() ) ) |
| @@ -262,8 +262,13 @@ | ||
| 262 | 262 | * Outputs html needed within the <head> for the in-plugin debugger page. |
| 263 | 263 | */ |
| 264 | 264 | public static function jetpack_debug_admin_head() { |
| 265 | 265 | |
| 266 | + $min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; | |
| 267 | + wp_enqueue_style( 'jetpack-admin', plugins_url( "css/jetpack-admin{$min}.css", JETPACK__PLUGIN_FILE ), array( 'genericons', 'jetpack-connection' ), JETPACK__VERSION . '-20121016' ); | |
| 268 | + wp_style_add_data( 'jetpack-admin', 'rtl', 'replace' ); | |
| 269 | + wp_style_add_data( 'jetpack-admin', 'suffix', $min ); | |
| 270 | + | |
| 266 | 271 | Jetpack_Admin_Page::load_wrapper_styles(); |
| 267 | 272 | ?> |
| 268 | 273 | <style type="text/css"> |
| 269 | 274 | |
| @@ -291,11 +296,10 @@ | ||
| 291 | 296 | margin: 0 0 25px 0; |
| 292 | 297 | } |
| 293 | 298 | |
| 294 | 299 | .formbox input[type="text"], .formbox input[type="email"], .formbox input[type="url"], .formbox textarea, #debug_info_div { |
| 295 | - border: 1px solid #dcdcde; | |
| 296 | - border-radius: 11px; | |
| 297 | - box-shadow: inset 0 1px 1px rgba(0,0,0,0.1); | |
| 300 | + border: 1px solid var(--wpds-color-stroke-surface-neutral-weak, #e4e4e4); | |
| 301 | + border-radius: var(--wpds-border-radius-md, 4px); | |
| 298 | 302 | color: #646970; |
| 299 | 303 | font-size: 14px; |
| 300 | 304 | padding: 10px; |
| 301 | 305 | width: 97%; |
| @@ -300,11 +304,11 @@ | ||
| 300 | 304 | padding: 10px; |
| 301 | 305 | width: 97%; |
| 302 | 306 | } |
| 303 | 307 | #debug_info_div { |
| 304 | - border-radius: 0; | |
| 308 | + border-radius: var(--wpds-border-radius-lg, 8px); | |
| 305 | 309 | margin-top: 16px; |
| 306 | - background: #FFF; | |
| 310 | + background: var(--wpds-color-background-surface-neutral-strong, #fff); | |
| 307 | 311 | padding: 16px; |
| 308 | 312 | } |
| 309 | 313 | .formbox .contact-support input[type="submit"] { |
| 310 | 314 | float: right; |