This commit is contained in:
KhaiNguyen
2020-02-13 10:39:37 +07:00
commit 59401cb805
12867 changed files with 4646216 additions and 0 deletions

View File

@@ -0,0 +1,59 @@
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin
*/
/**
* Alerts template variables.
*
* @noinspection PhpUnusedLocalVariableInspection
*
* @var array
*/
$alerts_data = Yoast_Alerts::get_template_variables();
$notifier = new WPSEO_Configuration_Notifier();
$notifier->listen();
$wpseo_contributors_phrase = sprintf(
/* translators: %1$s expands to Yoast SEO */
__( 'See who contributed to %1$s.', 'wordpress-seo' ),
'Yoast SEO'
);
?>
<div class="tab-block">
<div class="yoast-alerts">
<?php echo $notifier->notify(); ?>
<div class="yoast-container yoast-container__error">
<?php require WPSEO_PATH . 'admin/views/partial-alerts-errors.php'; ?>
</div>
<div class="yoast-container yoast-container__warning">
<?php require WPSEO_PATH . 'admin/views/partial-alerts-warnings.php'; ?>
</div>
</div>
</div>
<div class="tab-block">
<h3><?php esc_html_e( 'Credits', 'wordpress-seo' ); ?></h3>
<p>
<span class="dashicons dashicons-groups"></span>
<a href="<?php WPSEO_Shortlinker::show( 'https://yoa.st/yoast-seo-credits' ); ?>"><?php echo esc_html( $wpseo_contributors_phrase ); ?></a>
</p>
</div>
<?php
/**
* Action: 'wpseo_internal_linking' - Hook to add the internal linking analyze interface to the interface.
*
* @deprecated 7.0
*/
do_action_deprecated( 'wpseo_internal_linking', [], 'WPSEO 7.0' );

View File

@@ -0,0 +1,67 @@
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
$feature_toggles = Yoast_Feature_Toggles::instance()->get_all();
?>
<h2><?php esc_html_e( 'Features', 'wordpress-seo' ); ?></h2>
<div class="yoast-measure">
<?php
echo sprintf(
/* translators: %1$s expands to Yoast SEO */
esc_html__( '%1$s comes with a lot of features. You can enable / disable some of them below. Clicking the question mark gives more information about the feature.', 'wordpress-seo' ),
'Yoast SEO'
);
foreach ( $feature_toggles as $feature ) {
$help_text = esc_html( $feature->label );
if ( ! empty( $feature->extra ) ) {
$help_text .= ' ' . $feature->extra;
}
if ( ! empty( $feature->read_more_label ) ) {
$help_text .= ' ';
$help_text .= sprintf(
'<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a>',
esc_url( WPSEO_Shortlinker::get( $feature->read_more_url ) ),
esc_html( $feature->read_more_label )
);
}
$feature_help = new WPSEO_Admin_Help_Panel(
$feature->setting,
/* translators: %s expands to a feature's name */
sprintf( esc_html__( 'Help on: %s', 'wordpress-seo' ), esc_html( $feature->name ) ),
$help_text
);
$yform->toggle_switch(
$feature->setting,
[
'on' => __( 'On', 'wordpress-seo' ),
'off' => __( 'Off', 'wordpress-seo' ),
],
'<strong>' . $feature->name . '</strong>',
$feature_help->get_button_html() . $feature_help->get_panel_html()
);
}
?>
</div>
<?php
/*
* Required to prevent our settings framework from saving the default because the field isn't
* explicitly set when saving the Dashboard page.
*/
$yform->hidden( 'show_onboarding_notice', 'wpseo_show_onboarding_notice' );

View File

@@ -0,0 +1,21 @@
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
/**
* Fires when displaying the site wide analysis tab.
*
* @param Yoast_Form $yform The yoast form object.
*/
do_action( 'wpseo_settings_tab_site_analysis', $yform );

View File

@@ -0,0 +1,81 @@
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Views
*
* @uses Yoast_Form $yform Form object.
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
$webmaster_tools_help = new WPSEO_Admin_Help_Panel(
'dashboard-webmaster-tools',
esc_html__( 'Learn more about the Webmaster Tools verification', 'wordpress-seo' ),
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' ),
'has-wrapper'
);
echo '<h2 class="help-button-inline">' . esc_html__( 'Webmaster Tools verification', 'wordpress-seo' ) . $webmaster_tools_help->get_button_html() . '</h2>';
echo $webmaster_tools_help->get_panel_html();
$msverify_link = 'https://www.bing.com/toolbox/webmaster/#/Dashboard/?url=' .
rawurlencode( str_replace( 'http://', '', get_bloginfo( 'url' ) ) );
$googleverify_link = add_query_arg(
[
'hl' => 'en',
'tid' => 'alternate',
'siteUrl' => rawurlencode( get_bloginfo( 'url' ) ) . '/',
],
'https://www.google.com/webmasters/verification/verification'
);
$yform->textinput( 'baiduverify', __( 'Baidu verification code', 'wordpress-seo' ) );
echo '<p class="desc label">';
printf(
/* translators: %1$s expands to a link start tag to the Baidu Webmaster Tools site add page, %2$s is the link closing tag. */
esc_html__( 'Get your Baidu verification code in %1$sBaidu Webmaster Tools%2$s.', 'wordpress-seo' ),
/**
* Get the Baidu Webmaster Tools site add link from this 3rd party article.
* {@link http://www.dragonmetrics.com/how-to-optimize-your-site-with-baidu-webmaster-tools/}
* We are unable to create a Baidu Webmaster Tools account due to the Chinese phone number verification.
*/
'<a target="_blank" href="' . esc_url( 'https://ziyuan.baidu.com/site/siteadd' ) . '" rel="noopener noreferrer">',
'</a>'
);
echo '</p>';
$yform->textinput( 'msverify', __( 'Bing verification code', 'wordpress-seo' ) );
echo '<p class="desc label">';
printf(
/* translators: 1: link open tag; 2: link close tag. */
esc_html__( 'Get your Bing verification code in %1$sBing Webmaster Tools%2$s.', 'wordpress-seo' ),
'<a target="_blank" href="' . esc_url( $msverify_link ) . '" rel="noopener noreferrer">',
'</a>'
);
echo '</p>';
$yform->textinput( 'googleverify', __( 'Google verification code', 'wordpress-seo' ) );
echo '<p class="desc label">';
printf(
/* translators: 1: link open tag; 2: link close tag. */
esc_html__( 'Get your Google verification code in %1$sGoogle Search Console%2$s.', 'wordpress-seo' ),
'<a target="_blank" href="' . esc_url( $googleverify_link ) . '" rel="noopener noreferrer">',
'</a>'
);
echo '</p>';
$yform->textinput( 'yandexverify', __( 'Yandex verification code', 'wordpress-seo' ) );
echo '<p class="desc label">';
printf(
/* translators: 1: link open tag; 2: link close tag. */
esc_html__( 'Get your Yandex verification code in %1$sYandex Webmaster Tools%2$s.', 'wordpress-seo' ),
'<a target="_blank" href="' . esc_url( 'https://webmaster.yandex.com/sites/add/' ) . '" rel="noopener noreferrer">',
'</a>'
);
echo '</p>';