Skip to content

Commit

Permalink
Merge branch 'card-72893' into latest
Browse files Browse the repository at this point in the history
  • Loading branch information
akashmdiu committed Dec 19, 2024
2 parents 58d6409 + 07fba11 commit 2388b31
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 7 deletions.
26 changes: 26 additions & 0 deletions EmbedPress/Includes/Traits/Shared.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,32 @@ public function notices()
]
);

$holiday_message = '<div class="holiday_2024_notice"><p class="notice-message">🎁 <strong>SAVE 25% now</strong> & unlock advanced embedding functionalities from 150+ multi-media sources in 2025.</p>
<div class="notice-links">
<a class="button button-primary" href="https://embedpress.com/holiday24-admin-notice" target="_blank">
' . $king_icon . ' GET PRO Lifetime Access</a>
<a class="embedpress-notice-dismiss-button dismiss-btn" data-dismiss="true" href="#" target="_blank">No, I’ll Pay Full Price Later</a>
</div>
</div>';
$_holiday_2024_notice = [
'thumbnail' => $_assets_url . 'images/full-logo.svg',
'html' => $holiday_message,
];

$notices->add(
'holiday_2024_notice',
$_holiday_2024_notice,
[
'start' => $notices->time(),
'recurrence' => false,
'dismissible' => true,
'refresh' => EMBEDPRESS_VERSION,
"expire" => strtotime('11:59:59pm 10th January, 2025'),
'display_if' => !is_plugin_active('embedpress-pro/embedpress-pro.php') && ($_SERVER['REQUEST_URI'] === '/wp-admin/' || $_SERVER['REQUEST_URI'] === '/wp-admin/index.php'),
]
);

$notices->init();

self::$cache_bank->create_account($notices);
Expand Down
15 changes: 8 additions & 7 deletions assets/css/admin-notices.css
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,11 @@ div#wpnotice-embedpress-helloween_2024_notice {



.black_friday_2024_notice {
.holiday_2024_notice {
padding: 15px 0;
}

.black_friday_2024_notice a.button.button-primary {
.holiday_2024_notice a.button.button-primary {
display: inline-flex;
align-items: center;
gap: 8px;
Expand All @@ -294,18 +294,18 @@ div#wpnotice-embedpress-helloween_2024_notice {
min-height: 32px;
}

.black_friday_2024_notice a.button.button-primary svg {
.holiday_2024_notice a.button.button-primary svg {
height: 16px;
width: auto;
}

.black_friday_2024_notice p.notice-message {
.holiday_2024_notice p.notice-message {
margin-bottom: 8px;
margin-top: 0;
padding-top: 0;
}

.full-price-link {
.embedpress-notice-dismiss-button {
font-weight: 400;
line-height: 19.36px;
text-align: center;
Expand All @@ -326,7 +326,7 @@ div#wpnotice-embedpress-helloween_2024_notice {
margin-top: 0;
}

div#wpnotice-embedpress-black_friday_2024_notice {
div#wpnotice-embedpress-holiday_2024_notice {
gap: 50px !important;
padding-left: 40px;
}
Expand All @@ -340,7 +340,8 @@ div#wpnotice-embedpress-black_friday_2024_notice {
div#wpnotice-embedpress-helloween_2024_notice {
display: none !important;
}
div#wpnotice-embedpress-black_friday_2024_notice {

div#wpnotice-embedpress-holiday_2024_notice {
display: none !important;
}
}

0 comments on commit 2388b31

Please sign in to comment.