PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 18.3
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v18.3
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / admin / views / tabs / dashboard / webmaster-tools.php

webmaster-tools.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 18.3, at admin/views/tabs/dashboard/webmaster-tools.php

84 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WPSEO plugin file.
4 *
5 * @package WPSEO\Admin\Views
6 *
7 * @uses Yoast_Form $yform Form object.
8 */
9
10 if ( ! defined( 'WPSEO_VERSION' ) ) {
11 header( 'Status: 403 Forbidden' );
12 header( 'HTTP/1.1 403 Forbidden' );
13 exit();
14 }
15
16 $webmaster_tools_help = new WPSEO_Admin_Help_Panel(
17 'dashboard-webmaster-tools',
18 esc_html__( 'Learn more about the Webmaster Tools verification', 'wordpress-seo' ),
19 esc_html__( 'You can use the boxes below to verify with the different Webmaster Tools. This feature will add a verification meta tag on your home page. Follow the links to the different Webmaster Tools and look for instructions for the meta tag verification method to get the verification code. If your site is already verified, you can just forget about these.', 'wordpress-seo' ),
20 'has-wrapper'
21 );
22
23 // phpcs:ignore WordPress.Security.EscapeOutput -- get_button_html() output is properly escaped.
24 echo '<h2 class="help-button-inline">' . esc_html__( 'Webmaster Tools verification', 'wordpress-seo' ) . $webmaster_tools_help->get_button_html() . '</h2>';
25 // phpcs:ignore WordPress.Security.EscapeOutput -- get_panel_html() output is properly escaped.
26 echo $webmaster_tools_help->get_panel_html();
27
28 $msverify_link = 'https://www.bing.com/toolbox/webmaster/#/Dashboard/?url=' .
29 rawurlencode( str_replace( 'http://', '', get_bloginfo( 'url' ) ) );
30
31 $googleverify_link = add_query_arg(
32 [
33 'hl' => 'en',
34 'tid' => 'alternate',
35 'siteUrl' => rawurlencode( get_bloginfo( 'url' ) ) . '/',
36 ],
37 'https://www.google.com/webmasters/verification/verification'
38 );
39
40 $yform->textinput( 'baiduverify', __( 'Baidu verification code', 'wordpress-seo' ) );
41 echo '<p class="desc label">';
42 printf(
43 /* translators: %1$s expands to a link start tag to the Baidu Webmaster Tools site add page, %2$s is the link closing tag. */
44 esc_html__( 'Get your Baidu verification code in %1$sBaidu Webmaster Tools%2$s.', 'wordpress-seo' ),
45 /*
46 * Get the Baidu Webmaster Tools site add link from this 3rd party article.
47 * {@link http://www.dragonmetrics.com/how-to-optimize-your-site-with-baidu-webmaster-tools/}
48 * We are unable to create a Baidu Webmaster Tools account due to the Chinese phone number verification.
49 */
50 '<a target="_blank" href="' . esc_url( 'https://ziyuan.baidu.com/site/siteadd' ) . '" rel="noopener noreferrer">',
51 '</a>'
52 );
53 echo '</p>';
54
55 $yform->textinput( 'msverify', __( 'Bing verification code', 'wordpress-seo' ) );
56 echo '<p class="desc label">';
57 printf(
58 /* translators: 1: link open tag; 2: link close tag. */
59 esc_html__( 'Get your Bing verification code in %1$sBing Webmaster Tools%2$s.', 'wordpress-seo' ),
60 '<a target="_blank" href="' . esc_url( $msverify_link ) . '" rel="noopener noreferrer">',
61 '</a>'
62 );
63 echo '</p>';
64
65 $yform->textinput( 'googleverify', __( 'Google verification code', 'wordpress-seo' ) );
66 echo '<p class="desc label">';
67 printf(
68 /* translators: 1: link open tag; 2: link close tag. */
69 esc_html__( 'Get your Google verification code in %1$sGoogle Search Console%2$s.', 'wordpress-seo' ),
70 '<a target="_blank" href="' . esc_url( $googleverify_link ) . '" rel="noopener noreferrer">',
71 '</a>'
72 );
73 echo '</p>';
74
75 $yform->textinput( 'yandexverify', __( 'Yandex verification code', 'wordpress-seo' ) );
76 echo '<p class="desc label">';
77 printf(
78 /* translators: 1: link open tag; 2: link close tag. */
79 esc_html__( 'Get your Yandex verification code in %1$sYandex Webmaster Tools%2$s.', 'wordpress-seo' ),
80 '<a target="_blank" href="' . esc_url( 'https://webmaster.yandex.com/sites/add/' ) . '" rel="noopener noreferrer">',
81 '</a>'
82 );
83 echo '</p>';
84