Skip to content

Commit

Permalink
Merge pull request #21677 from Yoast/284-remove-mentions-of-coupon-co…
Browse files Browse the repository at this point in the history
…de-from-black-friday-ads

Revert "Merge pull request #21674 from Yoast/1866-236---bf---black-fr…
  • Loading branch information
vraja-pro authored Oct 2, 2024
2 parents 18d6ee7 + 07221b9 commit 91e08a1
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 17 deletions.
5 changes: 3 additions & 2 deletions admin/class-premium-upsell-admin-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ public function render() {
echo '<div class="' . esc_attr( $class ) . '">';

if ( YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2024-promotion' ) ) {
$bf_label = esc_html__( '30% OFF | Code: BF2024', 'wordpress-seo' );
$bf_label = esc_html__( 'BLACK FRIDAY', 'wordpress-seo' );
$sale_label = esc_html__( '30% OFF', 'wordpress-seo' );
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Already escaped above.
echo "<div class='black-friday-container'><span>$bf_label</span></div>";
echo "<div class='black-friday-container'><span>$sale_label</span> <span style='margin-left: auto;'>$bf_label</span> </div>";
}

echo '<div class="' . esc_attr( $class . '--container' ) . '">';
Expand Down
2 changes: 1 addition & 1 deletion admin/views/licenses.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@

if ( YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2024-promotion' ) ) {
/* translators: %1$s expands to opening span, %2$s expands to closing span */
$sale_badge_span = sprintf( esc_html__( '%1$s30%% OFF | Use code: BF2024%2$s', 'wordpress-seo' ), '<span>', '</span>' );
$sale_badge_span = sprintf( esc_html__( '%1$s30%% OFF%2$s', 'wordpress-seo' ), '<span>', '</span>' );

$sale_badge = '<div class="yoast-seo-premium-extension-sale-badge">' . $sale_badge_span . '</div>';

Expand Down
2 changes: 1 addition & 1 deletion inc/class-wpseo-admin-bar-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ protected function add_premium_link( WP_Admin_Bar $wp_admin_bar ) {
if ( YoastSEO()->classes->get( Promotion_Manager::class )->is( 'black-friday-2024-promotion' ) ) {
$sale_percentage = sprintf(
'<span class="admin-bar-premium-promotion">%1$s</span>',
esc_html__( '30% OFF | Code: BF2024', 'wordpress-seo' )
esc_html__( '30% OFF', 'wordpress-seo' )
);
}
$wp_admin_bar->add_menu(
Expand Down
10 changes: 5 additions & 5 deletions packages/js/src/components/BlackFridayPromotion.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ export const BlackFridayPromotion = ( {
const linkParams = useSelect( select => select( store ).selectLinkParams(), [ store ] );
const title = location === "sidebar"
? sprintf(
/* translators: %1$s expands to YOAST SEO PREMIUM */
__( "30%% OFF %1$s | Use code: BF2024", "wordpress-seo" ),
/* translators: %1$s expands to Yoast SEO Premium */
__( "Now with 30%% OFF: %1$s", "wordpress-seo" ),
"Yoast SEO Premium"
)
: createInterpolateElement(
sprintf(
/* translators: %1$s expands to YOAST SEO PREMIUM, %2$s expands to a link on yoast.com, %3$s expands to the anchor end tag. */
__( "30%% OFF %1$s | Use code: BF2024 %2$sBuy now!%3$s", "wordpress-seo" ),
/* translators: %1$s expands to Yoast SEO Premium, %2$s expands to a link on yoast.com, %3$s expands to the anchor end tag. */
__( "Now with 30%% OFF: %1$s %2$sBuy now!%3$s", "wordpress-seo" ),
"Yoast SEO Premium",
"<a>",
"</a>"
Expand All @@ -49,7 +49,7 @@ export const BlackFridayPromotion = ( {
title={ title }
{ ...props }
>
<span className="yoast-bf-sale-badge">{ __( "Black Friday", "wordpress-seo" ) } </span>
<span className="yoast-bf-sale-badge">{ __( "BLACK FRIDAY SALE", "wordpress-seo" ) } </span>
{ location === "sidebar" && <a
// Styling is to counteract the WP paragraph margin-bottom.
className="yst-block yst--mb-[1em]"
Expand Down
7 changes: 3 additions & 4 deletions packages/js/src/components/UpsellBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,9 @@ class UpsellBox extends Component {
return (
<Fragment>
{ isBlackFriday &&
<div className="yst-flex yst-flex-col yst-items-center yst-bg-black yst-border-amber-300 yst-border-y yst-border-x-0 yst-border-solid yst-gap-2 yst-py-2 yst-leading-5">
<div className="yst-mx-auto yst-text-amber-300 yst-text-lg">{ __( "BLACK FRIDAY | 30% OFF", "wordpress-seo" ) }</div>
<div className="yst-text-white yst-text-base yst-font-semibold">{ __( "Promo code", "wordpress-seo" ) }: BF2024</div>
</div> }
<div className="yst-flex yst-items-center yst-text-lg yst-content-between yst-bg-black yst-text-amber-300 yst-h-9 yst-border-amber-300 yst-border-y yst-border-x-0 yst-border-solid yst-px-6">
<div className="yst-mx-auto">{ __( "30% OFF - BLACK FRIDAY", "wordpress-seo" ) }</div>
</div> }
<Container>
<Heading>{ this.props.title }</Heading>
<Description>{ this.props.description }</Description>
Expand Down
7 changes: 5 additions & 2 deletions packages/js/src/settings/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,11 @@ const PremiumUpsellList = () => {

return (
<Paper as="div" className="xl:yst-max-w-3xl">
{ isBlackFriday && <div className="yst-rounded-t-lg yst-h-9 yst-flex yst-items-center yst-bg-black yst-text-amber-300 yst-px-4 yst-text-lg yst-border-b yst-border-amber-300 yst-border-solid yst-font-semibold">
<div>{ __( "30% OFF | Code: BF2024", "wordpress-seo" ) }</div>
{ isBlackFriday && <div
className="yst-rounded-t-lg yst-h-9 yst-flex yst-justify-between yst-items-center yst-bg-black yst-text-amber-300 yst-px-4 yst-text-lg yst-border-b yst-border-amber-300 yst-border-solid yst-font-semibold"
>
<div>{ __( "30% OFF", "wordpress-seo" ) }</div>
<div>{ __( "BLACK FRIDAY", "wordpress-seo" ) }</div>
</div> }
<div className="yst-p-6 yst-flex yst-flex-col">
<Title as="h2" size="4" className="yst-text-xl yst-text-primary-500">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const PremiumUpsellCard = ( { link, linkProps, promotions } ) => {
</figure>
{ isBlackFriday && <div className="sidebar__sale_banner_container">
<div className="sidebar__sale_banner">
<span className="banner_text">{ __( "30% OFF | Code: BF2024", "wordpress-seo" ) }</span>
<span className="banner_text">{ __( "30% OFF - BLACK FRIDAY", "wordpress-seo" ) }</span>
</div>
</div> }
<Title as="h2" className="yst-mt-6 yst-text-base yst-font-extrabold yst-text-white">
Expand Down
2 changes: 1 addition & 1 deletion src/presenters/admin/sidebar-presenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Sidebar_Presenter extends Abstract_Presenter {
* @return string The sidebar HTML.
*/
public function present() {
$title = \__( '30% OFF | Code: BF2024', 'wordpress-seo' );
$title = \__( '30% OFF - BLACK FRIDAY', 'wordpress-seo' );

$assets_uri = \trailingslashit( \plugin_dir_url( \WPSEO_FILE ) );
$buy_yoast_seo_shortlink = WPSEO_Shortlinker::get( 'https://yoa.st/jj' );
Expand Down

0 comments on commit 91e08a1

Please sign in to comment.