classes->get( Promotion_Manager::class )->is( 'black-friday-2024-promotion' ) ) {
/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
\printf( \esc_html__( '%1$sBuy%2$s %3$s', 'wordpress-seo' ), '', '', 'Yoast SEO Premium' );
}
else {
/* translators: %1$s and %2$s expand to a span wrap to avoid linebreaks. %3$s expands to "Yoast SEO Premium". */
\printf( \esc_html__( '%1$sGet%2$s %3$s', 'wordpress-seo' ), '', '', 'Yoast SEO Premium' );
}
?>
classes->get( Promotion_Manager::class )->is( 'black-friday-2024-promotion' ) ) {
echo \esc_html__( 'If you were thinking about upgrading, now\'s the time! 30% OFF ends 3rd Dec 11am (CET)', 'wordpress-seo' );
}
else {
echo \esc_html__( 'Use AI to generate titles and meta descriptions, automatically redirect deleted pages, get 24/7 support, and much, much more!', 'wordpress-seo' );
}
?>
Yoast SEO academy' );
echo ' ';
\esc_html_e( 'We have both free and premium online courses to learn everything you need to know about SEO.', 'wordpress-seo' );
?>
';
return $out;
}
}
indexing-error-presenter.php 0000666 00000010463 15173425432 0012234 0 ustar 00 short_link_helper = $short_link_helper;
$this->product_helper = $product_helper;
$this->addon_manager = $addon_manager;
}
/**
* Generates the first paragraph of the error message to show when indexing failed.
*
* The contents of the paragraph varies based on whether WordPress SEO Premium has a valid, activated subscription or not.
*
* @param bool $is_premium Whether WordPress SEO Premium is currently active.
* @param bool $has_valid_premium_subscription Whether WordPress SEO Premium currently has a valid subscription.
*
* @return string
*/
protected function generate_first_paragraph( $is_premium, $has_valid_premium_subscription ) {
$message = \__(
'Oops, something has gone wrong and we couldn\'t complete the optimization of your SEO data. Please click the button again to re-start the process. ',
'wordpress-seo'
);
if ( $is_premium ) {
if ( $has_valid_premium_subscription ) {
$message .= \__( 'If the problem persists, please contact support.', 'wordpress-seo' );
}
else {
$message = \sprintf(
/* translators: %1$s expands to an opening anchor tag for a link leading to the Premium installation page, %2$s expands to a closing anchor tag. */
\__(
'Oops, something has gone wrong and we couldn\'t complete the optimization of your SEO data. Please make sure to activate your subscription in MyYoast by completing %1$sthese steps%2$s.',
'wordpress-seo'
),
'',
''
);
}
}
return $message;
}
/**
* Generates the second paragraph of the error message to show when indexing failed.
*
* The error message varies based on whether WordPress SEO Premium has a valid, activated subscription or not.
*
* @param bool $is_premium Whether WordPress SEO Premium is currently active.
* @param bool $has_valid_premium_subscription Whether WordPress SEO Premium currently has a valid subscription.
*
* @return string The second paragraph of the error message.
*/
protected function generate_second_paragraph( $is_premium, $has_valid_premium_subscription ) {
return \sprintf(
/* translators: %1$s expands to an opening anchor tag for a link leading to the Premium installation page, %2$s expands to a closing anchor tag. */
\__(
'Below are the technical details for the error. See %1$sthis page%2$s for a more detailed explanation.',
'wordpress-seo'
),
'',
''
);
}
/**
* Presents the error message to show if SEO optimization failed.
*
* The error message varies based on whether WordPress SEO Premium has a valid, activated subscription or not.
*
* @return string The error message to show.
*/
public function present() {
$is_premium = $this->product_helper->is_premium();
$has_valid_premium_subscription = $this->addon_manager->has_valid_subscription( WPSEO_Addon_Manager::PREMIUM_SLUG );
$output = '
';
return $output;
}
}
badge-presenter.php 0000666 00000005221 15173425432 0010336 0 ustar 00 id = $id;
$this->link = $link;
$this->group = $group;
if ( ! $badge_group_names instanceof Badge_Group_Names ) {
$badge_group_names = new Badge_Group_Names();
}
$this->badge_group_names = $badge_group_names;
}
/**
* Presents the New Badge. If a link has been passed, the badge is presented with the link.
* Otherwise a static badge is presented.
*
* @return string The styled New Badge.
*/
public function present() {
if ( ! $this->is_group_still_new() ) {
return '';
}
if ( $this->link !== '' ) {
return \sprintf(
'%3$s',
\esc_attr( $this->id ),
\esc_url( $this->link ),
\esc_html__( 'New', 'wordpress-seo' )
);
}
return \sprintf(
'%2$s',
\esc_attr( $this->id ),
\esc_html__( 'New', 'wordpress-seo' )
);
}
/**
* Check whether the new badge should be shown according to the group it is in.
*
* @return bool True if still new.
*/
public function is_group_still_new() {
// If there's no group configured, the new badge is always active.
if ( ! $this->group ) {
return true;
}
return $this->badge_group_names->is_still_eligible_for_new_badge( $this->group );
}
}
indexing-failed-notification-presenter.php 0000666 00000005764 15173425432 0015023 0 ustar 00 class_addon_manager = $class_addon_manager;
$this->short_link_helper = $short_link_helper;
$this->product_helper = $product_helper;
}
/**
* Returns the notification as an HTML string.
*
* @return string The notification in an HTML string representation.
*/
public function present() {
$notification_text = \sprintf(
/* Translators: %1$s expands to an opening anchor tag for a link leading to the Yoast SEO tools page, %2$s expands to a closing anchor tag. */
\esc_html__(
'Something has gone wrong and we couldn\'t complete the optimization of your SEO data. Please %1$sre-start the process%2$s.',
'wordpress-seo'
),
'',
''
);
if ( $this->product_helper->is_premium() ) {
if ( $this->has_valid_premium_subscription() ) {
// Add a support message for premium customers.
$notification_text .= ' ';
$notification_text .= \esc_html__( 'If the problem persists, please contact support.', 'wordpress-seo' );
}
else {
// Premium plugin with inactive addon; overwrite the entire error message.
$notification_text = \sprintf(
/* Translators: %1$s expands to an opening anchor tag for a link leading to the Premium installation page, %2$s expands to a closing anchor tag. */
\esc_html__(
'Oops, something has gone wrong and we couldn\'t complete the optimization of your SEO data. Please make sure to activate your subscription in MyYoast by completing %1$sthese steps%2$s.',
'wordpress-seo'
),
'',
''
);
}
}
return '
' . $notification_text . '
';
}
/**
* Determines if the site has a valid Premium subscription.
*
* @return bool
*/
protected function has_valid_premium_subscription() {
return $this->class_addon_manager->has_valid_subscription( WPSEO_Addon_Manager::PREMIUM_SLUG );
}
}
woocommerce-beta-editor-presenter.php 0000666 00000003360 15173425432 0014012 0 ustar 00 short_link_helper = $short_link_helper;
}
/**
* Returns the notification as an HTML string.
*
* @return string The notification in an HTML string representation.
*/
public function present() {
$notification_text = '
';
return $notification_text;
}
/**
* Returns the message to show.
*
* @return string The message.
*/
protected function get_message() {
return \sprintf(
'%1$s %2$s',
\esc_html__( 'Compatibility issue: Yoast SEO is incompatible with the beta WooCommerce product editor.', 'wordpress-seo' ),
\sprintf(
/* translators: 1: Yoast SEO, 2: Link start tag to the Learn more link, 3: Link closing tag. */
\esc_html__( 'The %1$s interface is currently unavailable in the beta WooCommerce product editor. To resolve any issues, please disable the beta editor. %2$sLearn how to disable the beta WooCommerce product editor.%3$s', 'wordpress-seo' ),
'Yoast SEO',
'',
''
)
);
}
}
indexing-notification-presenter.php 0000666 00000013141 15173425432 0013565 0 ustar 00 short_link_helper = $short_link_helper;
$this->total_unindexed = $total_unindexed;
$this->reason = $reason;
}
/**
* Returns the notification as an HTML string.
*
* @return string The HTML string representation of the notification.
*/
public function present() {
$notification_text = '
';
$notification_text .= '';
$notification_text .= \esc_html__( 'Start SEO data optimization', 'wordpress-seo' );
$notification_text .= '';
return $notification_text;
}
/**
* Determines the message to show in the indexing notification.
*
* @param string $reason The reason identifier.
*
* @return string The message to show in the notification.
*/
protected function get_message( $reason ) {
switch ( $reason ) {
case Indexing_Reasons::REASON_PERMALINK_SETTINGS:
$text = \esc_html__( 'Because of a change in your permalink structure, some of your SEO data needs to be reprocessed.', 'wordpress-seo' );
break;
case Indexing_Reasons::REASON_HOME_URL_OPTION:
$text = \esc_html__( 'Because of a change in your home URL setting, some of your SEO data needs to be reprocessed.', 'wordpress-seo' );
break;
case Indexing_Reasons::REASON_CATEGORY_BASE_PREFIX:
$text = \esc_html__( 'Because of a change in your category base setting, some of your SEO data needs to be reprocessed.', 'wordpress-seo' );
break;
case Indexing_Reasons::REASON_TAG_BASE_PREFIX:
$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' );
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' );
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' );
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' );
}
/**
* Filter: 'wpseo_indexables_indexation_alert' - Allow developers to filter the reason of the indexation
*
* @param string $text The text to show as reason.
* @param string $reason The reason value.
*/
return (string) \apply_filters( 'wpseo_indexables_indexation_alert', $text, $reason );
}
/**
* Creates a time estimate based on the total number on unindexed objects.
*
* @param int $total_unindexed The total number of unindexed objects.
*
* @return string The time estimate as a HTML string.
*/
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' );
}
if ( $total_unindexed < 2500 ) {
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 .= '
';
$estimate .= '
';
$estimate .= \sprintf(
/* translators: 1: Expands to Yoast SEO */
\esc_html__( 'Wait for a week or so, until %1$s automatically processes most of your content in the background.', 'wordpress-seo' ),
'Yoast SEO'
);
$estimate .= '
';
$estimate .= '
';
$estimate .= \sprintf(
/* translators: 1: Link to article about indexation command, 2: Anchor closing tag, 3: Link to WP CLI. */
\esc_html__( '%1$sRun the indexation process on your server%2$s using %3$sWP CLI%2$s.', 'wordpress-seo' ),
'',
'',
''
);
$estimate .= '
';
return $output;
}
}
indexing-list-item-presenter.php 0000666 00000003012 15173425432 0013002 0 ustar 00 short_link_helper = $short_link_helper;
}
/**
* Presents the list item for the tools menu.
*
* @return string The list item HTML.
*/
public function present() {
$output = \sprintf( '
%s ', \esc_html__( 'Optimize SEO Data', 'wordpress-seo' ) );
$output .= \sprintf(
'%1$s %3$s',
\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. If you have a lot of content it might take a while, but trust us, it\'s worth it.', 'wordpress-seo' ),
\esc_url( $this->short_link_helper->get( 'https://yoa.st/3-z' ) ),
\esc_html__( 'Learn more about the benefits of optimized SEO data.', 'wordpress-seo' )
);
$output .= '';
$output .= '
';
return $output;
}
}
search-engines-discouraged-presenter.php 0000666 00000002666 15173425432 0014470 0 ustar 00 ';
$notification_text .= $this->get_message();
$notification_text .= '';
return $notification_text;
}
/**
* Returns the message to show.
*
* @return string The message.
*/
protected function get_message() {
return \sprintf(
'%1$s %2$s ',
\esc_html__( 'Huge SEO Issue: You\'re blocking access to robots.', 'wordpress-seo' ),
\sprintf(
/* translators: 1: Link start tag to the WordPress Reading Settings page, 2: Link closing tag. */
\esc_html__( 'If you want search engines to show this site in their results, you must %1$sgo to your Reading Settings%2$s and uncheck the box for Search Engine Visibility.', 'wordpress-seo' ),
'',
''
),
\esc_js( \wp_create_nonce( 'wpseo-ignore' ) ),
\esc_html__( 'I don\'t want this site to show in the search results.', 'wordpress-seo' )
);
}
}
migration-error-presenter.php 0000666 00000004264 15173425432 0012422 0 ustar 00 migration_error = $migration_error;
}
/**
* Presents the migration error that occurred.
*
* @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' ),
'Yoast SEO'
);
$support = \sprintf(
/* translators: %1$s: link to help article about solving table issue. %2$s: is anchor closing. */
\esc_html__( 'Please read %1$sthis help article%2$s to find out how to resolve this problem.', 'wordpress-seo' ),
'',
''
);
$reassurance = \sprintf(
/* translators: %s: Yoast SEO. */
\esc_html__( 'Your site will continue to work normally, but won\'t take full advantage of %s.', 'wordpress-seo' ),
'Yoast SEO'
);
$debug_info = \sprintf(
'%1$s