1 parent
9737a7c310
commit
358542eef5
1078 files changed
+33799
-65099
No files matched your search
@@ -91,7 +91,6 @@ class WPSEO_Admin_Init {
|
||||
), wp_customize_url() );
|
||||
|
||||
$info_message = sprintf(
|
||||
/* translators: 1: link open tag; 2: link close tag. */
|
||||
__( 'You still have the default WordPress tagline, even an empty one is probably better. %1$sYou can fix this in the customizer%2$s.', 'wordpress-seo' ),
|
||||
'<a href="' . esc_attr( $customize_url ) . '">',
|
||||
'</a>'
|
||||
@@ -153,8 +152,8 @@ class WPSEO_Admin_Init {
|
||||
$info_message = __( 'Paging comments is enabled, this is not needed in 999 out of 1000 cases, we recommend to disable it.', 'wordpress-seo' );
|
||||
$info_message .= '<br/>';
|
||||
|
||||
/* translators: %1$s resolves to the opening tag of the link to the comment setting page, %2$s resolves to the closing tag of the link */
|
||||
$info_message .= sprintf(
|
||||
/* translators: %1$s resolves to the opening tag of the link to the comment setting page, %2$s resolves to the closing tag of the link */
|
||||
__( 'Simply uncheck the box before "Break comments into pages..." on the %1$sComment settings page%2$s.', 'wordpress-seo' ),
|
||||
'<a href="' . esc_url( admin_url( 'options-discussion.php' ) ) . '">',
|
||||
'</a>'
|
||||
@@ -184,9 +183,8 @@ class WPSEO_Admin_Init {
|
||||
*/
|
||||
public function has_default_tagline() {
|
||||
$blog_description = get_bloginfo( 'description' );
|
||||
$default_blog_description = 'Just another WordPress site';
|
||||
$translated_blog_description = __( 'Just another WordPress site' );
|
||||
return $translated_blog_description === $blog_description || $default_blog_description === $blog_description;
|
||||
$default_blog_description = 'Just another WordPress site';
|
||||
return __( $default_blog_description ) === $blog_description || $default_blog_description === $blog_description;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -303,7 +301,7 @@ class WPSEO_Admin_Init {
|
||||
*/
|
||||
private function get_yoast_seo_compatibility_notification( $name, $plugin, $level = Yoast_Notification::WARNING ) {
|
||||
$info_message = sprintf(
|
||||
/* translators: %1$s expands to Yoast SEO, %2$s expands to the plugin version, %3$s expands to the plugin name */
|
||||
/* translators: %1$s expands to Yoast SEO, %2$s expands to the plugin version, %3$s expands to the plugin name */
|
||||
__( '%1$s detected you are using version %2$s of %3$s, please update to the latest version to prevent compatibility issues.', 'wordpress-seo' ),
|
||||
'Yoast SEO',
|
||||
$plugin['version'],
|
||||
@@ -335,8 +333,8 @@ class WPSEO_Admin_Init {
|
||||
if ( $can_access && ! $this->is_site_notice_dismissed( 'wpseo_dismiss_recalculate' ) ) {
|
||||
Yoast_Notification_Center::get()->add_notification(
|
||||
new Yoast_Notification(
|
||||
/* translators: 1: is a link to 'admin_url / admin.php?page=wpseo_tools&recalculate=1' 2: closing link tag */
|
||||
sprintf(
|
||||
/* translators: 1: is a link to 'admin_url / admin.php?page=wpseo_tools&recalculate=1' 2: closing link tag */
|
||||
__( 'We\'ve updated our SEO score algorithm. %1$sRecalculate the SEO scores%2$s for all posts and pages.', 'wordpress-seo' ),
|
||||
'<a href="' . admin_url( 'admin.php?page=wpseo_tools&recalculate=1' ) . '">',
|
||||
'</a>'
|
||||
@@ -440,12 +438,16 @@ class WPSEO_Admin_Init {
|
||||
* @link https://github.com/Yoast/i18n-module
|
||||
*/
|
||||
private function register_i18n_promo_class() {
|
||||
// BC, because an older version of the i18n-module didn't have this class.
|
||||
new Yoast_I18n_WordPressOrg_v2(
|
||||
new yoast_i18n(
|
||||
array(
|
||||
'textdomain' => 'wordpress-seo',
|
||||
'plugin_name' => 'Yoast SEO',
|
||||
'hook' => 'wpseo_admin_promo_footer',
|
||||
'textdomain' => 'wordpress-seo',
|
||||
'project_slug' => 'wordpress-seo',
|
||||
'plugin_name' => 'Yoast SEO',
|
||||
'hook' => 'wpseo_admin_promo_footer',
|
||||
'glotpress_url' => 'http://translate.yoast.com/gp/',
|
||||
'glotpress_name' => 'Yoast Translate',
|
||||
'glotpress_logo' => 'https://translate.yoast.com/gp-templates/images/Yoast_Translate.svg',
|
||||
'register_url' => 'https://translate.yoast.com/gp/projects#utm_source=plugin&utm_medium=promo-box&utm_campaign=wpseo-i18n-promo',
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -495,7 +497,7 @@ class WPSEO_Admin_Init {
|
||||
|
||||
foreach ( $deprecated_notices as $deprecated_filter ) {
|
||||
_deprecated_function(
|
||||
/* translators: %s expands to the actual filter/action that has been used. */
|
||||
/* %s expands to the actual filter/action that has been used. */
|
||||
sprintf( __( '%s filter/action', 'wordpress-seo' ), $deprecated_filter ),
|
||||
'WPSEO 3.0',
|
||||
'javascript'
|
||||
@@ -514,6 +516,17 @@ class WPSEO_Admin_Init {
|
||||
return filter_input( INPUT_GET, $notice_name ) === '1' && wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), $notice_name );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not the user has seen the tagline notice
|
||||
*
|
||||
* @deprecated 3.3
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function seen_tagline_notice() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the permalink uses %postname%
|
||||
*
|
||||
@@ -523,28 +536,12 @@ class WPSEO_Admin_Init {
|
||||
return ( false !== strpos( get_option( 'permalink_structure' ), '%postname%' ) );
|
||||
}
|
||||
|
||||
/********************** DEPRECATED METHODS **********************/
|
||||
|
||||
/**
|
||||
* Returns whether or not the user has seen the tagline notice
|
||||
*
|
||||
* @deprecated 3.3
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function seen_tagline_notice() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 3.3.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirect first time or just upgraded users to the about screen.
|
||||
*
|
||||
* @deprecated 3.5
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function after_update_notice() {
|
||||
_deprecated_function( __METHOD__, 'WPSEO 3.5' );
|
||||
_deprecated_function( 'WPSEO_Admin_Init::after_update_notice', 'WPSEO 3.5' );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user