Merged in feature/MAW-855-import-code-into-aws (pull request #2)
code import from pantheon * code import from pantheon
This commit is contained in:
@@ -202,6 +202,17 @@ class Yoast_Feature_Toggles {
|
||||
'premium_upsell_url' => 'https://yoa.st/get-indexnow',
|
||||
'order' => 110,
|
||||
],
|
||||
(object) [
|
||||
'name' => __( 'AI title & description generator', 'wordpress-seo' ),
|
||||
'premium' => true,
|
||||
'setting' => 'enable_ai_generator',
|
||||
'label' => __( 'Use the power of Yoast AI to automatically generate compelling titles and descriptions for your posts and pages.', 'wordpress-seo' ),
|
||||
'read_more_label' => __( 'Learn more', 'wordpress-seo' ),
|
||||
'read_more_url' => 'https://yoa.st/ai-generator-read-more',
|
||||
'premium_url' => 'https://yoa.st/ai-generator-feature',
|
||||
'premium_upsell_url' => 'https://yoa.st/get-ai-generator',
|
||||
'order' => 115,
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,7 +14,7 @@ if ( ! defined( 'WPSEO_VERSION' ) ) {
|
||||
|
||||
<script type="text/html" id="tmpl-primary-term-ui">
|
||||
<?php
|
||||
/* translators: accessibility text. %1$s expands to the term title, %2$s to the taxonomy title. */
|
||||
/* translators: Hidden accessibility text; %1$s expands to the term title, %2$s to the taxonomy title. */
|
||||
$yoast_free_js_button_label = __( 'Make %1$s primary %2$s', 'wordpress-seo' );
|
||||
$yoast_free_js_button_label = sprintf(
|
||||
$yoast_free_js_button_label,
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
* @since 5.1
|
||||
*/
|
||||
|
||||
use Yoast\WP\SEO\Promotions\Application\Promotion_Manager;
|
||||
|
||||
if ( ! defined( 'WPSEO_VERSION' ) ) {
|
||||
header( 'Status: 403 Forbidden' );
|
||||
header( 'HTTP/1.1 403 Forbidden' );
|
||||
@@ -20,6 +22,7 @@ $premium_extension = [
|
||||
'title' => 'Yoast SEO Premium',
|
||||
/* translators: %1$s expands to Yoast SEO */
|
||||
'desc' => sprintf( __( 'The premium version of %1$s with more features & support.', 'wordpress-seo' ), 'Yoast SEO' ),
|
||||
'image' => plugin_dir_url( WPSEO_FILE ) . 'packages/js/images/Yoast_SEO_Icon.svg',
|
||||
'benefits' => [],
|
||||
];
|
||||
|
||||
@@ -122,9 +125,23 @@ $has_valid_premium_subscription = YoastSEO()->helpers->product->is_premium() &&
|
||||
$wpseo_extensions_header = sprintf( __( '%1$s Extensions', 'wordpress-seo' ), 'Yoast SEO' );
|
||||
$new_tab_message = sprintf(
|
||||
'<span class="screen-reader-text">%1$s</span>',
|
||||
/* translators: Hidden accessibility text. */
|
||||
esc_html__( '(Opens in a new browser tab)', 'wordpress-seo' )
|
||||
);
|
||||
|
||||
$sale_badge = '';
|
||||
$premium_sale_badge = '';
|
||||
|
||||
if ( YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2023-promotion' ) ) {
|
||||
/* translators: %1$s expands to opening span, %2$s expands to closing span */
|
||||
$sale_badge_span = sprintf( esc_html__( '%1$sSALE 30%% OFF!%2$s', 'wordpress-seo' ), '<span>', '</span>' );
|
||||
|
||||
$sale_badge = '<div class="yoast-seo-premium-extension-sale-badge">' . $sale_badge_span . '</div>';
|
||||
|
||||
$premium_sale_badge = ( $has_valid_premium_subscription ) ? '' : $sale_badge;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="wrap yoast wpseo_table_page">
|
||||
@@ -133,23 +150,26 @@ $new_tab_message = sprintf(
|
||||
|
||||
<div id="extensions">
|
||||
<section class="yoast-seo-premium-extension">
|
||||
<?php echo $premium_sale_badge; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: Output is already escaped ?>
|
||||
<h2>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: 1: expands to a opening span tag, 2: expands to a closing span tag, 3: expands to Yoast SEO Premium */
|
||||
esc_html__( '%1$sDrive more traffic to your site%2$s with %3$s', 'wordpress-seo' ),
|
||||
'<span class="yoast-heading-highlight">',
|
||||
'</span>',
|
||||
/* translators: 1: expands to Yoast SEO Premium */
|
||||
esc_html__( 'Drive more traffic to your site with %1$s', 'wordpress-seo' ),
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: The `get_title` value is hardcoded; only passed through the WPSEO_Extensions class.
|
||||
$premium_extension['title']
|
||||
);
|
||||
?>
|
||||
<img alt="" width="100" height="100" src="<?php echo esc_url( $premium_extension['image'] ); ?>"/>
|
||||
</h2>
|
||||
|
||||
<?php
|
||||
if ( ! $has_valid_premium_subscription ) :
|
||||
?>
|
||||
<ul class="yoast-seo-premium-benefits yoast-list--usp">
|
||||
<li class="yoast-seo-premium-benefits__item">
|
||||
<span class="yoast-seo-premium-benefits__title"><?php esc_html_e( 'Be more efficient in creating content', 'wordpress-seo' ); ?></span>
|
||||
<span class="yoast-seo-premium-benefits__description"><?php esc_html_e( 'Use AI to create high-quality titles and meta descriptions for posts and pages', 'wordpress-seo' ); ?></span>
|
||||
</li>
|
||||
<li class="yoast-seo-premium-benefits__item">
|
||||
<span class="yoast-seo-premium-benefits__title"><?php esc_html_e( 'Reach bigger audiences', 'wordpress-seo' ); ?></span>
|
||||
<span class="yoast-seo-premium-benefits__description"><?php esc_html_e( 'Optimize a single post for synonyms and related keyphrases and get extra checks with the Premium SEO analysis', 'wordpress-seo' ); ?></span>
|
||||
@@ -279,6 +299,9 @@ $new_tab_message = sprintf(
|
||||
}
|
||||
?>
|
||||
<section class="yoast-promoblock secondary yoast-promo-extension">
|
||||
<?php if ( ! $addon_manager->has_valid_subscription( $slug ) || ! $addon_manager->is_installed( $slug ) ) : ?>
|
||||
<?php echo $sale_badge; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Reason: Output already escaped ?>
|
||||
<?php endif; ?>
|
||||
<h3>
|
||||
<img alt="" width="100" height="100" src="<?php echo esc_url( $extension['image'] ); ?>"/>
|
||||
<?php echo esc_html( $extension['display_title'] ); ?>
|
||||
|
||||
@@ -35,6 +35,7 @@ if ( ! function_exists( '_yoast_display_notifications' ) ) {
|
||||
case 'active':
|
||||
$button = sprintf(
|
||||
'<button type="button" class="button dismiss"><span class="screen-reader-text">%1$s</span><span class="dashicons dashicons-hidden"></span></button>',
|
||||
/* translators: Hidden accessibility text. */
|
||||
esc_html__( 'Hide this item.', 'wordpress-seo' )
|
||||
);
|
||||
break;
|
||||
@@ -42,6 +43,7 @@ if ( ! function_exists( '_yoast_display_notifications' ) ) {
|
||||
case 'dismissed':
|
||||
$button = sprintf(
|
||||
'<button type="button" class="button restore"><span class="screen-reader-text">%1$s</span><span class="dashicons yoast-svg-icon-eye"></span></button>',
|
||||
/* translators: Hidden accessibility text. */
|
||||
esc_html__( 'Show this item.', 'wordpress-seo' )
|
||||
);
|
||||
break;
|
||||
|
||||
@@ -39,6 +39,6 @@ $wpseo_contributors_phrase = sprintf(
|
||||
<div class="tab-block">
|
||||
<h2><?php esc_html_e( 'Credits', 'wordpress-seo' ); ?></h2>
|
||||
<p>
|
||||
<a href="<?php WPSEO_Shortlinker::show( 'https://yoa.st/yoast-seo-credits' ); ?>"><?php echo esc_html( $wpseo_contributors_phrase ); ?></a>
|
||||
<a href="<?php WPSEO_Shortlinker::show( 'https://yoa.st/yoast-seo-credits' ); ?>" target="_blank"><?php echo esc_html( $wpseo_contributors_phrase ); ?></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +58,7 @@ $feature_toggles = Yoast_Feature_Toggles::instance()->get_all();
|
||||
|
||||
$feature_help = new WPSEO_Admin_Help_Panel(
|
||||
WPSEO_Option::ALLOW_KEY_PREFIX . $feature->setting,
|
||||
/* translators: %s expands to a feature's name */
|
||||
/* translators: Hidden accessibility text; %s expands to a feature's name. */
|
||||
sprintf( esc_html__( 'Help on: %s', 'wordpress-seo' ), esc_html( $feature->name ) ),
|
||||
$help_text
|
||||
);
|
||||
|
||||
@@ -46,7 +46,7 @@ $integration_toggles = Yoast_Integration_Toggles::instance()->get_all();
|
||||
|
||||
$feature_help = new WPSEO_Admin_Help_Panel(
|
||||
WPSEO_Option::ALLOW_KEY_PREFIX . $integration->setting,
|
||||
/* translators: %s expands to an integration's name */
|
||||
/* translators: Hidden accessibility text; %s expands to an integration's name. */
|
||||
sprintf( esc_html__( 'Help on: %s', 'wordpress-seo' ), esc_html( $integration->name ) ),
|
||||
$help_text
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user