| 1 |
<?php |
| 2 |
/** |
| 3 |
* WPSEO plugin file. |
| 4 |
* |
| 5 |
* @package WPSEO\Admin\Google_Search_Console |
| 6 |
*/ |
| 7 |
|
| 8 |
// Admin header. |
| 9 |
Yoast_Form::get_instance()->admin_header( false, 'wpseo-gsc', false, 'yoast_wpseo_gsc_options' ); |
| 10 |
|
| 11 |
// GSC Error notification. |
| 12 |
$gsc_url = 'https://search.google.com/search-console/index'; |
| 13 |
$gsc_post_url = 'https://yoa.st/google-search-console-deprecated'; |
| 14 |
$gsc_style_alert = ' |
| 15 |
display: flex; |
| 16 |
align-items: baseline; |
| 17 |
position: relative; |
| 18 |
padding: 16px; |
| 19 |
border: 1px solid rgba(0, 0, 0, 0.2); |
| 20 |
font-size: 14px; |
| 21 |
font-weight: 400; |
| 22 |
line-height: 1.5; |
| 23 |
margin: 16px 0; |
| 24 |
color: #450c11; |
| 25 |
background: #f8d7da; |
| 26 |
'; |
| 27 |
$gsc_style_alert_icon = 'display: block; margin-right: 8px;'; |
| 28 |
$gsc_style_alert_content = 'max-width: 600px;'; |
| 29 |
$gsc_style_alert_link = 'color: #004973;'; |
| 30 |
$gsc_notification = sprintf( |
| 31 |
/* Translators: %1$s: expands to opening anchor tag, %2$s expands to closing anchor tag. */ |
| 32 |
__( 'Google has discontinued its Crawl Errors API. Therefore, any possible crawl errors you might have cannot be displayed here anymore. %1$sRead our statement on this for further information%2$s.', 'wordpress-seo' ), |
| 33 |
'<a style="' . $gsc_style_alert_link . '" href="' . WPSEO_Shortlinker::get( $gsc_post_url ) . '" target="_blank" rel="noopener">', |
| 34 |
WPSEO_Admin_Utils::get_new_tab_message() . '</a>', |
| 35 |
); |
| 36 |
$gsc_notification .= '<br/><br/>'; |
| 37 |
$gsc_notification .= sprintf( |
| 38 |
/* Translators: %1$s: expands to opening anchor tag, %2$s expands to closing anchor tag. */ |
| 39 |
__( 'To view your current crawl errors, %1$splease visit Google Search Console%2$s.', 'wordpress-seo' ), |
| 40 |
'<a style="' . $gsc_style_alert_link . '" href="' . $gsc_url . '" target="_blank" rel="noopener noreferrer">', |
| 41 |
WPSEO_Admin_Utils::get_new_tab_message() . '</a>', |
| 42 |
); |
| 43 |
?> |
| 44 |
<div style="<?php echo $gsc_style_alert; ?>"> |
| 45 |
<span style="<?php echo $gsc_style_alert_icon; ?>"> |
| 46 |
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="14" viewBox="0 0 12 14" role="img" aria-hidden="true" |
| 47 |
focusable="false" fill="#450c11"> |
| 48 |
<path |
| 49 |
d="M6 1q1.6 0 3 .8T11.2 4t.8 3-.8 3T9 12.2 6 13t-3-.8T.8 10 0 7t.8-3T3 1.8 6 1zm1 9.7V9.3 9L6.7 9H5l-.1.3V10.9l.3.1h1.6l.1-.3zm0-2.6L7 3.2v-.1L6.8 3H5 5l-.1.2.1 4.9.3.2h1.4l.2-.1Q7 8 6.9 8z"></path> |
| 50 |
</svg> |
| 51 |
</span> |
| 52 |
<span style="<?php echo $gsc_style_alert_content; ?>"><?php echo $gsc_notification; ?></span> |
| 53 |
</div> |
| 54 |
<?php |
| 55 |
|