← All changes
|
_inc/lib/debugger/class-jetpack-debugger.php
+207
-212
12.0.3
→
16.3-a.1
View file →
| @@ -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,200 +44,216 @@ | ||
| 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 | - <h2><?php esc_html_e( 'Debugging Center', 'jetpack' ); ?></h2> | |
| 52 | - <h3><?php esc_html_e( "Testing your site's compatibility with Jetpack...", 'jetpack' ); ?></h3> | |
| 53 | - <div class="jetpack-debug-test-container"> | |
| 54 | - <?php | |
| 55 | - if ( $cxntests->pass() ) { | |
| 56 | - echo '<div class="jetpack-tests-succeed">' . esc_html__( 'Your Jetpack setup looks a-okay!', 'jetpack' ) . '</div>'; | |
| 57 | - } else { | |
| 58 | - $failures = $cxntests->list_fails(); | |
| 59 | - foreach ( $failures as $fail ) { | |
| 60 | - $action_link = $fail['action']; | |
| 61 | - $action_label = $fail['action_label']; | |
| 62 | - $action = ( $action_link ) ? '<a href="' . $action_link . '">' . $action_label . '</a>' : $action_label; | |
| 63 | - echo '<div class="jetpack-test-error">'; | |
| 64 | - echo '<p><a class="jetpack-test-heading" href="#">' . esc_html( $fail['short_description'] ); | |
| 65 | - echo '<span class="noticon noticon-collapse"></span></a></p>'; | |
| 66 | - echo '<p class="jetpack-test-details">' . wp_kses( | |
| 67 | - $action, | |
| 68 | - array( | |
| 69 | - 'a' => array( | |
| 70 | - 'href' => array(), | |
| 71 | - 'target' => array(), | |
| 72 | - 'rel' => array(), | |
| 73 | - ), | |
| 74 | - ) | |
| 75 | - ) . '</p>'; | |
| 76 | - echo '</div>'; | |
| 51 | + <div class="jp-static-block"> | |
| 52 | + <h2><?php esc_html_e( 'Debugging Center', 'jetpack' ); ?></h2> | |
| 53 | + | |
| 54 | + <div class="jp-static-block-body"> | |
| 55 | + <h3><?php esc_html_e( "Testing your site's compatibility with Jetpack...", 'jetpack' ); ?></h3> | |
| 56 | + <div class="jetpack-debug-test-container"> | |
| 57 | + <?php | |
| 58 | + if ( $cxntests->pass() ) { | |
| 59 | + echo '<div class="jetpack-tests-succeed">' . esc_html__( 'Your Jetpack setup looks a-okay!', 'jetpack' ) . '</div>'; | |
| 60 | + } else { | |
| 61 | + $failures = $cxntests->list_fails(); | |
| 62 | + foreach ( $failures as $fail ) { | |
| 63 | + ?> | |
| 64 | + <div class="notice notice-error inline"> | |
| 65 | + <div class="notice-icon-wrapper"> | |
| 66 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="-2 -2 24 24" width="24" height="24" class="y_IPyP1wIAOhyNaqvXJq" aria-hidden="true" focusable="false"><path d="M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"></path></svg> | |
| 67 | + </div> | |
| 68 | + | |
| 69 | + <div class="notice-main-content"> | |
| 70 | + <div class="notice-title"><?php echo esc_html( $fail['short_description'] ); ?></div> | |
| 71 | + | |
| 72 | + <div class="notice-action-bar"> | |
| 73 | + <div> | |
| 74 | + <a href="<?php echo esc_attr( $fail['action'] ); ?>" aria-disabled="false" class="components-button is-primary"><span><?php echo esc_html( $fail['action_label'] ); ?></span></a> | |
| 75 | + </div> | |
| 76 | + </div> | |
| 77 | + </div> | |
| 78 | + </div> | |
| 79 | + <?php | |
| 80 | + } | |
| 77 | 81 | } |
| 78 | - } | |
| 79 | - ?> | |
| 80 | - </div> | |
| 81 | - <div class="entry-content"> | |
| 82 | - <h3><?php esc_html_e( 'Trouble with Jetpack?', 'jetpack' ); ?></h3> | |
| 83 | - <h4><?php esc_html_e( 'It may be caused by one of these issues, which you can diagnose yourself:', 'jetpack' ); ?></h4> | |
| 84 | - <ol> | |
| 85 | - <li><b><em> | |
| 86 | - <?php | |
| 87 | - esc_html_e( 'A known issue.', 'jetpack' ); | |
| 88 | 82 | ?> |
| 89 | - </em></b> | |
| 90 | - <?php | |
| 91 | - echo sprintf( | |
| 92 | - wp_kses( | |
| 93 | - /* translators: URLs to Jetpack support pages. */ | |
| 94 | - __( 'Some themes and plugins have <a href="%1$s" target="_blank">known conflicts</a> with Jetpack – check the <a href="%2$s" target="_blank">list</a>. (You can also browse the <a href="%3$s" target="_blank">Jetpack support pages</a> or <a href="%4$s" target="_blank">Jetpack support forum</a> to see if others have experienced and solved the problem.)', 'jetpack' ), | |
| 95 | - array( | |
| 96 | - 'a' => array( | |
| 97 | - 'href' => array(), | |
| 98 | - 'target' => array(), | |
| 83 | + </div> | |
| 84 | + | |
| 85 | + <div class="entry-content"> | |
| 86 | + <h4><?php esc_html_e( 'Trouble with Jetpack?', 'jetpack' ); ?></h4> | |
| 87 | + <p><?php esc_html_e( 'It may be caused by one of these issues, which you can diagnose yourself:', 'jetpack' ); ?></p> | |
| 88 | + <ol> | |
| 89 | + <li><?php esc_html_e( 'A known issue.', 'jetpack' ); ?> | |
| 90 | + <?php | |
| 91 | + printf( | |
| 92 | + wp_kses( | |
| 93 | + /* translators: URLs to Jetpack support pages. */ | |
| 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 | + array( | |
| 96 | + 'a' => array( | |
| 97 | + 'href' => array(), | |
| 98 | + 'target' => array(), | |
| 99 | + 'rel' => array(), | |
| 100 | + ), | |
| 101 | + ) | |
| 99 | 102 | ), |
| 100 | - ) | |
| 101 | - ), | |
| 102 | - esc_url( Redirect::get_url( 'jetpack-contact-support-known-issues' ) ), | |
| 103 | - esc_url( Redirect::get_url( 'jetpack-contact-support-known-issues' ) ), | |
| 104 | - esc_url( Redirect::get_url( 'jetpack-support' ) ), | |
| 105 | - esc_url( Redirect::get_url( 'wporg-support-plugin-jetpack' ) ) | |
| 106 | - ); | |
| 107 | - ?> | |
| 108 | - </li> | |
| 109 | - <li><b><em><?php esc_html_e( 'An incompatible plugin.', 'jetpack' ); ?></em></b> <?php esc_html_e( "Find out by disabling all plugins except Jetpack. If the problem persists, it's not a plugin issue. If the problem is solved, turn your plugins on one by one until the problem pops up again – there's the culprit! Let us know, and we'll try to help.", 'jetpack' ); ?></li> | |
| 110 | - <li> | |
| 111 | - <b><em><?php esc_html_e( 'A theme conflict.', 'jetpack' ); ?></em></b> | |
| 112 | - <?php | |
| 113 | - $default_theme = wp_get_theme( WP_DEFAULT_THEME ); | |
| 103 | + esc_url( Redirect::get_url( 'jetpack-contact-support-known-issues' ) ), | |
| 104 | + esc_url( Redirect::get_url( 'jetpack-support' ) ), | |
| 105 | + esc_url( Redirect::get_url( 'wporg-support-plugin-jetpack' ) ) | |
| 106 | + ); | |
| 107 | + ?> | |
| 108 | + </li> | |
| 109 | + <li> | |
| 110 | + <?php esc_html_e( 'An incompatible plugin.', 'jetpack' ); ?> | |
| 111 | + <?php esc_html_e( "Find out by disabling all plugins except Jetpack. If the problem persists, it's not a plugin issue. If the problem is solved, turn your plugins on one by one until the problem pops up again – there's the culprit! Let us know, and we'll try to help.", 'jetpack' ); ?> | |
| 112 | + </li> | |
| 113 | + <li> | |
| 114 | + <?php esc_html_e( 'A theme conflict.', 'jetpack' ); ?> | |
| 115 | + <?php | |
| 116 | + $default_theme = wp_get_theme( WP_DEFAULT_THEME ); | |
| 114 | 117 | |
| 115 | - if ( $default_theme->exists() ) { | |
| 116 | - /* translators: %s is the name of a theme */ | |
| 117 | - echo esc_html( sprintf( __( "If your problem isn't known or caused by a plugin, try activating %s (the default WordPress theme).", 'jetpack' ), $default_theme->get( 'Name' ) ) ); | |
| 118 | - } else { | |
| 119 | - esc_html_e( "If your problem isn't known or caused by a plugin, try activating the default WordPress theme.", 'jetpack' ); | |
| 120 | - } | |
| 121 | - ?> | |
| 122 | - <?php esc_html_e( "If this solves the problem, something in your theme is probably broken – let the theme's author know.", 'jetpack' ); ?> | |
| 123 | - </li> | |
| 124 | - <li><b><em><?php esc_html_e( 'A problem with your XMLRPC file.', 'jetpack' ); ?></em></b> | |
| 125 | - <?php | |
| 126 | - echo sprintf( | |
| 127 | - wp_kses( | |
| 128 | - /* translators: The URL to the site's xmlrpc.php file. */ | |
| 129 | - __( 'Load your <a href="%s">XMLRPC file</a>. It should say “XML-RPC server accepts POST requests only.” on a line by itself.', 'jetpack' ), | |
| 130 | - array( 'a' => array( 'href' => array() ) ) | |
| 131 | - ), | |
| 132 | - esc_attr( site_url( 'xmlrpc.php' ) ) | |
| 133 | - ); | |
| 134 | - ?> | |
| 135 | - <ul> | |
| 136 | - <li>- <?php esc_html_e( "If it's not by itself, a theme or plugin is displaying extra characters. Try steps 2 and 3.", 'jetpack' ); ?></li> | |
| 137 | - <li>- <?php esc_html_e( 'If you get a 404 message, contact your web host. Their security may block XMLRPC.', 'jetpack' ); ?></li> | |
| 138 | - </ul> | |
| 139 | - </li> | |
| 140 | - <?php if ( current_user_can( 'jetpack_disconnect' ) && Jetpack::is_connection_ready() ) : ?> | |
| 141 | - <li> | |
| 142 | - <strong><em><?php esc_html_e( 'A connection problem with WordPress.com.', 'jetpack' ); ?></em></strong> | |
| 118 | + if ( $default_theme->exists() ) { | |
| 119 | + /* translators: %s is the name of a theme */ | |
| 120 | + echo esc_html( sprintf( __( "If your problem isn't known or caused by a plugin, try activating %s (the default WordPress theme).", 'jetpack' ), $default_theme->get( 'Name' ) ) ); | |
| 121 | + } else { | |
| 122 | + esc_html_e( "If your problem isn't known or caused by a plugin, try activating the default WordPress theme.", 'jetpack' ); | |
| 123 | + } | |
| 124 | + ?> | |
| 125 | + <?php esc_html_e( "If this solves the problem, something in your theme is probably broken – let the theme's author know.", 'jetpack' ); ?> | |
| 126 | + </li> | |
| 127 | + <li> | |
| 128 | + <?php esc_html_e( 'A problem with your XML-RPC file.', 'jetpack' ); ?> | |
| 129 | + <?php | |
| 130 | + printf( | |
| 131 | + wp_kses( | |
| 132 | + /* translators: The URL to the site's xmlrpc.php file. */ | |
| 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 | + array( 'a' => array( 'href' => array() ) ) | |
| 135 | + ), | |
| 136 | + esc_attr( site_url( 'xmlrpc.php' ) ) | |
| 137 | + ); | |
| 138 | + ?> | |
| 139 | + <ul> | |
| 140 | + <li><?php esc_html_e( "If it's not by itself, a theme or plugin is displaying extra characters. Try steps 2 and 3.", 'jetpack' ); ?></li> | |
| 141 | + <li><?php esc_html_e( 'If you get a 404 message, contact your web host. Their security may block the XML-RPC file.', 'jetpack' ); ?></li> | |
| 142 | + </ul> | |
| 143 | + </li> | |
| 144 | + | |
| 145 | + <?php if ( current_user_can( 'jetpack_disconnect' ) && Jetpack::is_connection_ready() ) : ?> | |
| 146 | + <li> | |
| 147 | + <?php esc_html_e( 'A connection problem with WordPress.com.', 'jetpack' ); ?> | |
| 148 | + <?php | |
| 149 | + printf( | |
| 150 | + wp_kses( | |
| 151 | + /* translators: URL to disconnect and reconnect Jetpack. */ | |
| 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 | + array( | |
| 154 | + 'a' => array( | |
| 155 | + 'href' => array(), | |
| 156 | + 'class' => array(), | |
| 157 | + ), | |
| 158 | + ) | |
| 159 | + ), | |
| 160 | + esc_attr( | |
| 161 | + wp_nonce_url( | |
| 162 | + Jetpack::admin_url( | |
| 163 | + array( | |
| 164 | + 'page' => 'jetpack-debugger', | |
| 165 | + 'disconnect' => true, | |
| 166 | + ) | |
| 167 | + ), | |
| 168 | + 'jp_disconnect', | |
| 169 | + 'nonce' | |
| 170 | + ) | |
| 171 | + ) | |
| 172 | + ); | |
| 173 | + ?> | |
| 174 | + </li> | |
| 175 | + <?php endif; ?> | |
| 176 | + </ol> | |
| 177 | + | |
| 178 | + <h4><?php esc_html_e( 'Still having trouble?', 'jetpack' ); ?></h4> | |
| 179 | + <p> | |
| 180 | + <?php esc_html_e( 'Ask us for help!', 'jetpack' ); ?> | |
| 181 | + | |
| 143 | 182 | <?php |
| 144 | - echo sprintf( | |
| 183 | + /** | |
| 184 | + * Offload to new WordPress debug data. | |
| 185 | + */ | |
| 186 | + printf( | |
| 145 | 187 | wp_kses( |
| 146 | - /* translators: URL to disconnect and reconnect Jetpack. */ | |
| 147 | - __( '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' ), | |
| 148 | - array( | |
| 149 | - 'a' => array( | |
| 150 | - 'href' => array(), | |
| 151 | - 'class' => array(), | |
| 152 | - ), | |
| 153 | - ) | |
| 188 | + /* translators: URL for Jetpack support. URL for WordPress's Site Health */ | |
| 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 | + array( 'a' => array( 'href' => array() ) ) | |
| 154 | 191 | ), |
| 155 | - esc_attr( | |
| 156 | - wp_nonce_url( | |
| 157 | - Jetpack::admin_url( | |
| 158 | - array( | |
| 159 | - 'page' => 'jetpack-debugger', | |
| 160 | - 'disconnect' => true, | |
| 161 | - ) | |
| 162 | - ), | |
| 163 | - 'jp_disconnect', | |
| 164 | - 'nonce' | |
| 165 | - ) | |
| 166 | - ) | |
| 192 | + esc_url( $support_url ), | |
| 193 | + esc_url( admin_url() . 'site-health.php?tab=debug' ) | |
| 167 | 194 | ); |
| 168 | 195 | ?> |
| 169 | - </li> | |
| 170 | - <?php endif; ?> | |
| 171 | - </ol> | |
| 172 | - <h4><?php esc_html_e( 'Still having trouble?', 'jetpack' ); ?></h4> | |
| 173 | - <p><b><em><?php esc_html_e( 'Ask us for help!', 'jetpack' ); ?></em></b> | |
| 174 | - <?php | |
| 175 | - /** | |
| 176 | - * Offload to new WordPress debug data. | |
| 177 | - */ | |
| 178 | - echo sprintf( | |
| 179 | - wp_kses( | |
| 180 | - /* translators: URL for Jetpack support. URL for WordPress's Site Health */ | |
| 181 | - __( '<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' ), | |
| 182 | - array( 'a' => array( 'href' => array() ) ) | |
| 183 | - ), | |
| 184 | - esc_url( $support_url ), | |
| 185 | - esc_url( admin_url() . 'site-health.php?tab=debug' ) | |
| 186 | - ); | |
| 187 | - ?> | |
| 188 | 196 | </p> |
| 189 | - <hr /> | |
| 190 | - <?php if ( Jetpack::is_connection_ready() ) : ?> | |
| 191 | - <div id="connected-user-details"> | |
| 192 | - <h3><?php esc_html_e( 'More details about your Jetpack settings', 'jetpack' ); ?></h3> | |
| 193 | - <p> | |
| 194 | - <?php | |
| 195 | - printf( | |
| 196 | - wp_kses( | |
| 197 | - /* translators: %s is an e-mail address */ | |
| 198 | - __( 'The primary connection is owned by <strong>%s</strong>\'s WordPress.com account.', 'jetpack' ), | |
| 199 | - array( 'strong' => array() ) | |
| 200 | - ), | |
| 201 | - esc_html( Jetpack::get_master_user_email() ) | |
| 202 | - ); | |
| 203 | - ?> | |
| 197 | + </div> | |
| 198 | + </div> | |
| 199 | + </div> | |
| 200 | + | |
| 201 | + <div class="jp-static-block"> | |
| 202 | + <h2><?php esc_html_e( 'More details about your Jetpack settings', 'jetpack' ); ?></h2> | |
| 203 | + | |
| 204 | + <div class="jp-static-block-body"> | |
| 205 | + <?php if ( Jetpack::is_connection_ready() ) : ?> | |
| 206 | + <div id="connected-user-details"> | |
| 207 | + <p> | |
| 208 | + <?php | |
| 209 | + printf( | |
| 210 | + wp_kses( | |
| 211 | + /* translators: %s is an e-mail address */ | |
| 212 | + __( 'The primary connection is owned by <strong>%s</strong>\'s WordPress.com account.', 'jetpack' ), | |
| 213 | + array( 'strong' => array() ) | |
| 214 | + ), | |
| 215 | + esc_html( Jetpack::get_master_user_email() ) | |
| 216 | + ); | |
| 217 | + ?> | |
| 204 | 218 | </p> |
| 205 | - </div> | |
| 206 | - <?php else : ?> | |
| 207 | - <div id="dev-mode-details"> | |
| 208 | - <p> | |
| 209 | - <?php | |
| 219 | + </div> | |
| 220 | + <?php else : ?> | |
| 221 | + <div id="dev-mode-details"> | |
| 222 | + <p> | |
| 223 | + <?php | |
| 224 | + printf( | |
| 225 | + wp_kses( | |
| 226 | + /* translators: Link to a Jetpack support page. */ | |
| 227 | + __( 'Would you like to use Jetpack on your local development site? You can do so thanks to <a href="%s">Jetpack\'s offline mode</a>.', 'jetpack' ), | |
| 228 | + array( 'a' => array( 'href' => array() ) ) | |
| 229 | + ), | |
| 230 | + esc_url( Redirect::get_url( 'jetpack-support-development-mode' ) ) | |
| 231 | + ); | |
| 232 | + ?> | |
| 233 | + </p> | |
| 234 | + </div> | |
| 235 | + <?php endif; ?> | |
| 236 | + | |
| 237 | + <?php | |
| 238 | + if ( | |
| 239 | + current_user_can( 'jetpack_manage_modules' ) | |
| 240 | + && ( ( new Status() )->is_offline_mode() || Jetpack::is_connection_ready() ) | |
| 241 | + ) { | |
| 210 | 242 | printf( |
| 211 | 243 | wp_kses( |
| 212 | - /* translators: Link to a Jetpack support page. */ | |
| 213 | - __( 'Would you like to use Jetpack on your local development site? You can do so thanks to <a href="%s">Jetpack\'s offline mode</a>.', 'jetpack' ), | |
| 214 | - array( 'a' => array( 'href' => array() ) ) | |
| 244 | + '<p><a href="%1$s">%2$s</a></p>', | |
| 245 | + array( | |
| 246 | + 'a' => array( 'href' => array() ), | |
| 247 | + 'p' => array(), | |
| 248 | + ) | |
| 215 | 249 | ), |
| 216 | - esc_url( Redirect::get_url( 'jetpack-support-development-mode' ) ) | |
| 250 | + esc_attr( Jetpack::admin_url( 'page=jetpack_modules' ) ), | |
| 251 | + esc_html__( 'Access the full list of Jetpack modules available on your site.', 'jetpack' ) | |
| 217 | 252 | ); |
| 218 | - ?> | |
| 219 | - </p> | |
| 220 | - </div> | |
| 221 | - <?php endif; ?> | |
| 222 | - <?php | |
| 223 | - if ( | |
| 224 | - current_user_can( 'jetpack_manage_modules' ) | |
| 225 | - && ( ( new Status() )->is_offline_mode() || Jetpack::is_connection_ready() ) | |
| 226 | - ) { | |
| 227 | - printf( | |
| 228 | - wp_kses( | |
| 229 | - '<p><a href="%1$s">%2$s</a></p>', | |
| 230 | - array( | |
| 231 | - 'a' => array( 'href' => array() ), | |
| 232 | - 'p' => array(), | |
| 233 | - ) | |
| 234 | - ), | |
| 235 | - esc_attr( Jetpack::admin_url( 'page=jetpack_modules' ) ), | |
| 236 | - esc_html__( 'Access the full list of Jetpack modules available on your site.', 'jetpack' ) | |
| 237 | - ); | |
| 238 | - } | |
| 239 | - ?> | |
| 253 | + } | |
| 254 | + ?> | |
| 255 | + </div> | |
| 240 | 256 | </div> |
| 241 | 257 | </div> |
| 242 | 258 | <?php |
| 243 | 259 | } |
| @@ -246,20 +262,28 @@ | ||
| 246 | 262 | * Outputs html needed within the <head> for the in-plugin debugger page. |
| 247 | 263 | */ |
| 248 | 264 | public static function jetpack_debug_admin_head() { |
| 249 | 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 | + | |
| 250 | 271 | Jetpack_Admin_Page::load_wrapper_styles(); |
| 251 | 272 | ?> |
| 252 | 273 | <style type="text/css"> |
| 253 | 274 | |
| 254 | 275 | .jetpack-debug-test-container { |
| 255 | - margin-top: 20px; | |
| 256 | - margin-bottom: 30px; | |
| 276 | + margin: 8px 0; | |
| 257 | 277 | } |
| 258 | 278 | |
| 279 | + #connected-user-details p strong { | |
| 280 | + word-break: break-all; | |
| 281 | + } | |
| 282 | + | |
| 259 | 283 | .jetpack-tests-succeed { |
| 260 | 284 | font-size: large; |
| 261 | - color: #8BAB3E; | |
| 285 | + color: #069E08; | |
| 262 | 286 | } |
| 263 | 287 | |
| 264 | 288 | .jetpack-test-details { |
| 265 | 289 | margin: 4px 6px; |
| @@ -267,44 +291,15 @@ | ||
| 267 | 291 | overflow: auto; |
| 268 | 292 | display: none; |
| 269 | 293 | } |
| 270 | 294 | |
| 271 | - .jetpack-test-error { | |
| 272 | - margin-bottom: 10px; | |
| 273 | - background: #FFEBE8; | |
| 274 | - border: solid 1px #C00; | |
| 275 | - border-radius: 3px; | |
| 276 | - } | |
| 277 | - | |
| 278 | - .jetpack-test-error p { | |
| 279 | - margin: 0; | |
| 280 | - padding: 0; | |
| 281 | - } | |
| 282 | - | |
| 283 | - p.jetpack-test-details { | |
| 284 | - margin: 4px 6px; | |
| 285 | - padding: 10px; | |
| 286 | - } | |
| 287 | - | |
| 288 | - .jetpack-test-error a.jetpack-test-heading { | |
| 289 | - padding: 4px 6px; | |
| 290 | - display: block; | |
| 291 | - text-decoration: none; | |
| 292 | - color: inherit; | |
| 293 | - } | |
| 294 | - | |
| 295 | - .jetpack-test-error .noticon { | |
| 296 | - float: right; | |
| 297 | - } | |
| 298 | - | |
| 299 | 295 | .formbox { |
| 300 | 296 | margin: 0 0 25px 0; |
| 301 | 297 | } |
| 302 | 298 | |
| 303 | 299 | .formbox input[type="text"], .formbox input[type="email"], .formbox input[type="url"], .formbox textarea, #debug_info_div { |
| 304 | - border: 1px solid #dcdcde; | |
| 305 | - border-radius: 11px; | |
| 306 | - 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); | |
| 307 | 302 | color: #646970; |
| 308 | 303 | font-size: 14px; |
| 309 | 304 | padding: 10px; |
| 310 | 305 | width: 97%; |
| @@ -309,11 +304,11 @@ | ||
| 309 | 304 | padding: 10px; |
| 310 | 305 | width: 97%; |
| 311 | 306 | } |
| 312 | 307 | #debug_info_div { |
| 313 | - border-radius: 0; | |
| 308 | + border-radius: var(--wpds-border-radius-lg, 8px); | |
| 314 | 309 | margin-top: 16px; |
| 315 | - background: #FFF; | |
| 310 | + background: var(--wpds-color-background-surface-neutral-strong, #fff); | |
| 316 | 311 | padding: 16px; |
| 317 | 312 | } |
| 318 | 313 | .formbox .contact-support input[type="submit"] { |
| 319 | 314 | float: right; |