plugin updates
This commit is contained in:
@@ -53,8 +53,8 @@ class Indexing_Notification_Presenter extends Abstract_Presenter {
|
||||
* @return string The HTML string representation of the notification.
|
||||
*/
|
||||
public function present() {
|
||||
$notification_text = '<p>' . $this->get_message( $this->reason ) . '</p>';
|
||||
$notification_text .= '<p>' . $this->get_time_estimate( $this->total_unindexed ) . '</p>';
|
||||
$notification_text = '<p>' . $this->get_message( $this->reason );
|
||||
$notification_text .= $this->get_time_estimate( $this->total_unindexed ) . '</p>';
|
||||
$notification_text .= '<a class="button" href="' . \get_admin_url( null, 'admin.php?page=wpseo_tools&start-indexation=true' ) . '">';
|
||||
$notification_text .= \esc_html__( 'Start SEO data optimization', 'wordpress-seo' );
|
||||
$notification_text .= '</a>';
|
||||
@@ -84,16 +84,16 @@ class Indexing_Notification_Presenter extends Abstract_Presenter {
|
||||
$text = \esc_html__( 'Because of a change in your tag base setting, some of your SEO data needs to be reprocessed.', 'wordpress-seo' );
|
||||
break;
|
||||
case Indexing_Reasons::REASON_POST_TYPE_MADE_PUBLIC:
|
||||
$text = \esc_html__( 'We need to re-analyze some of your SEO data because of a change in the visibility of your post types. Please help us do that by running the SEO data optimization. ', 'wordpress-seo' );
|
||||
$text = \esc_html__( 'We need to re-analyze some of your SEO data because of a change in the visibility of your post types. Please help us do that by running the SEO data optimization.', 'wordpress-seo' );
|
||||
break;
|
||||
case Indexing_Reasons::REASON_TAXONOMY_MADE_PUBLIC:
|
||||
$text = \esc_html__( 'We need to re-analyze some of your SEO data because of a change in the visibility of your taxonomies. Please help us do that by running the SEO data optimization. ', 'wordpress-seo' );
|
||||
$text = \esc_html__( 'We need to re-analyze some of your SEO data because of a change in the visibility of your taxonomies. Please help us do that by running the SEO data optimization.', 'wordpress-seo' );
|
||||
break;
|
||||
case Indexing_Reasons::REASON_ATTACHMENTS_MADE_ENABLED:
|
||||
$text = \esc_html__( 'It looks like you\'ve enabled media pages. We recommend that you help us to re-analyze your site by running the SEO data optimization. ', 'wordpress-seo' );
|
||||
$text = \esc_html__( 'It looks like you\'ve enabled media pages. We recommend that you help us to re-analyze your site by running the SEO data optimization.', 'wordpress-seo' );
|
||||
break;
|
||||
default:
|
||||
$text = \esc_html__( 'You can speed up your site and get insight into your internal linking structure by letting us perform a few optimizations to the way SEO data is stored. ', 'wordpress-seo' );
|
||||
$text = \esc_html__( 'You can speed up your site and get insight into your internal linking structure by letting us perform a few optimizations to the way SEO data is stored.', 'wordpress-seo' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,14 +114,14 @@ class Indexing_Notification_Presenter extends Abstract_Presenter {
|
||||
*/
|
||||
protected function get_time_estimate( $total_unindexed ) {
|
||||
if ( $total_unindexed < 400 ) {
|
||||
return \esc_html__( 'We estimate this will take less than a minute.', 'wordpress-seo' );
|
||||
return \esc_html__( ' We estimate this will take less than a minute.', 'wordpress-seo' );
|
||||
}
|
||||
|
||||
if ( $total_unindexed < 2500 ) {
|
||||
return \esc_html__( 'We estimate this will take a couple of minutes.', 'wordpress-seo' );
|
||||
return \esc_html__( ' We estimate this will take a couple of minutes.', 'wordpress-seo' );
|
||||
}
|
||||
|
||||
$estimate = \esc_html__( 'We estimate this could take a long time, due to the size of your site. As an alternative to waiting, you could:', 'wordpress-seo' );
|
||||
$estimate = \esc_html__( ' We estimate this could take a long time, due to the size of your site. As an alternative to waiting, you could:', 'wordpress-seo' );
|
||||
$estimate .= '<ul class="ul-disc">';
|
||||
$estimate .= '<li>';
|
||||
$estimate .= \sprintf(
|
||||
|
||||
@@ -37,6 +37,11 @@ class Migration_Error_Presenter extends Abstract_Presenter {
|
||||
* @return string The error HTML.
|
||||
*/
|
||||
public function present() {
|
||||
$header = \sprintf(
|
||||
/* translators: %s: Yoast SEO. */
|
||||
\esc_html__( '%s is unable to create database tables', 'wordpress-seo' ),
|
||||
'Yoast SEO'
|
||||
);
|
||||
$message = \sprintf(
|
||||
/* translators: %s: Yoast SEO. */
|
||||
\esc_html__( '%s had problems creating the database tables needed to speed up your site.', 'wordpress-seo' ),
|
||||
@@ -61,7 +66,8 @@ class Migration_Error_Presenter extends Abstract_Presenter {
|
||||
);
|
||||
|
||||
return \sprintf(
|
||||
'<div class="notice notice-error"><p>%1$s</p><p>%2$s</p><p>%3$s</p>%4$s</div>',
|
||||
'<div class="notice notice-error yoast-migrated-notice"><h4 class="yoast-notice-migrated-header">%1$s</h4><div class="notice-yoast-content"><p>%2$s</p><p>%3$s</p><p>%4$s</p>%5$s</div></div>',
|
||||
$header,
|
||||
$message,
|
||||
$support,
|
||||
$reassurance,
|
||||
|
||||
@@ -104,15 +104,17 @@ class Notice_Presenter extends Abstract_Presenter {
|
||||
$out .= '<div class="notice-yoast__header">';
|
||||
$out .= '<span class="yoast-icon"></span>';
|
||||
$out .= \sprintf(
|
||||
'<h2 class="notice-yoast__header-heading">%s</h2>',
|
||||
'<h2 class="notice-yoast__header-heading yoast-notice-migrated-header">%s</h2>',
|
||||
\esc_html( $this->title )
|
||||
);
|
||||
$out .= '</div>';
|
||||
$out .= '<div class="notice-yoast-content">';
|
||||
$out .= '<p>' . $this->content . '</p>';
|
||||
if ( ! \is_null( $this->button ) ) {
|
||||
$out .= '<p>' . $this->button . '</p>';
|
||||
}
|
||||
$out .= '</div>';
|
||||
$out .= '</div>';
|
||||
|
||||
if ( ! \is_null( $this->image_filename ) ) {
|
||||
$out .= '<img src="' . \esc_url( \plugin_dir_url( \WPSEO_FILE ) . 'images/' . $this->image_filename ) . '" alt="" height="60" width="75"/>';
|
||||
|
||||
Reference in New Issue
Block a user