-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from pluginever/release/1.0.2
Prepare release v1.0.2
- Loading branch information
Showing
25 changed files
with
480 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
.notice.notice-halloween { | ||
position: relative; | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
border: 1px solid #5900a8; | ||
border-left-width: 4px; | ||
.notice-content { | ||
max-width: 75%; | ||
color: #ffffff; | ||
h3 { | ||
color: #ffffff; | ||
font-size: 1.6rem; | ||
line-height: 1.3; | ||
} | ||
p { | ||
font-size: .9rem; | ||
line-height: 1.6; | ||
} | ||
} | ||
.notice-footer { | ||
justify-content: space-between; | ||
border-top: 1px solid #5900a8; | ||
.footer-btn { | ||
display: flex; | ||
gap: 20px; | ||
} | ||
.halloween-upgrade-btn { | ||
background-color: #ffffff; | ||
padding: 5px 12px; | ||
color: #4203A0; | ||
border-radius: 3px; | ||
&:hover{ | ||
background-color: #D6CDE4; | ||
} | ||
} | ||
.halloween-remind-btn { | ||
background-color: #FFFFFF52; | ||
padding: 5px 12px; | ||
color: #FFFFFF; | ||
border-radius: 3px; | ||
&:hover{ | ||
background-color: #FFFFFF66; | ||
} | ||
} | ||
.halloween-remove-btn { | ||
color: #ffffff; | ||
&:hover{ | ||
color: #D6CDE4; | ||
} | ||
} | ||
.halloween-dismiss-btn{ | ||
position: absolute; | ||
top: 20px; | ||
right: 30px; | ||
color: #FFFFFF; | ||
&:hover { | ||
color: #D6CDE4; | ||
} | ||
} | ||
.halloween-footer-text { | ||
float: right; | ||
color: #ffffff; | ||
} | ||
} | ||
@media screen and (max-width: 500px ) { | ||
background-position:right; | ||
.notice-body { | ||
align-items: flex-start; | ||
padding-top: 36px; | ||
} | ||
.notice-footer { | ||
flex-direction: column; | ||
.footer-btn { | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 10px; | ||
} | ||
.halloween-dismiss-btn { | ||
top: 8px; | ||
right: 20px; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,5 +80,3 @@ Thumbs.db | |
*.*.map | ||
|
||
# Build related files | ||
src | ||
/src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
|
||
namespace WooCommerceDonationManager\Admin; | ||
|
||
defined( 'ABSPATH' ) || exit; // Exit if accessed directly. | ||
|
||
/** | ||
* Notices class. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
class Notices { | ||
|
||
/** | ||
* Notices constructor. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public function __construct() { | ||
add_action( 'admin_init', array( $this, 'admin_notices' ) ); | ||
} | ||
|
||
/** | ||
* Admin notices. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public function admin_notices() { | ||
$installed_time = get_option( 'wcdm_installed' ); | ||
$current_time = wp_date( 'U' ); | ||
|
||
// Halloween's promotion notice. | ||
$halloween_time = date_i18n( strtotime( '2024-11-11 00:00:00' ) ); | ||
if ( $current_time < $halloween_time ) { | ||
WCDM()->notices->add( | ||
array( | ||
'message' => __DIR__ . '/views/notices/halloween.php', | ||
'dismissible' => false, | ||
'notice_id' => 'wcdm_halloween_promotion', | ||
'style' => 'border-left-color: #8500ff;background-image: url("' . esc_url( WCDM()->get_assets_url( 'images/halloween-banner.svg' ) ) . '");', | ||
'class' => 'notice-halloween', | ||
) | ||
); | ||
} | ||
|
||
if ( ! defined( 'WCDM_PRO_VERSION' ) ) { | ||
WCDM()->notices->add( | ||
array( | ||
'message' => __DIR__ . '/views/notices/upgrade.php', | ||
'notice_id' => 'wcdm_upgrade', | ||
'style' => 'border-left-color: #0542fa;', | ||
'dismissible' => false, | ||
) | ||
); | ||
} | ||
|
||
// Show after 5 days. | ||
if ( $installed_time && $current_time > ( $installed_time + ( 5 * DAY_IN_SECONDS ) ) ) { | ||
WCDM()->notices->add( | ||
array( | ||
'message' => __DIR__ . '/views/notices/review.php', | ||
'dismissible' => false, | ||
'notice_id' => 'wcdm_review', | ||
'style' => 'border-left-color: #0542fa;', | ||
) | ||
); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
/** | ||
* Admin notice: Halloween offer. | ||
* | ||
* @package WooCommerceDonationManager | ||
* @since 1.1.2 | ||
* @return void | ||
*/ | ||
|
||
defined( 'ABSPATH' ) || exit; // Exit if accessed directly. | ||
|
||
?> | ||
<div class="notice-body"> | ||
<div class="notice-icon"> | ||
<img src="<?php echo esc_url( WCDM()->get_assets_url( 'images/halloween-icon.svg' ) ); ?>" alt="WooCommerce Donation Manager Halloween Offer"> | ||
</div> | ||
<div class="notice-content"> | ||
<h3> | ||
<?php esc_html_e( 'Limited Time Offer! PluginEver Halloween Sale: 30% OFF!!', 'wc-donation-manager' ); ?> | ||
</h3> | ||
<p> | ||
<?php | ||
echo wp_kses_post( | ||
sprintf( | ||
// translators: 1.Offer Percentage, 2. Coupon Code. | ||
__( 'Spectacular Halloween Deal! Get %1$s on all premium plugins with code %2$s. Don\'t miss out — this offer vanishes soon! 👻', 'wc-donation-manager' ), | ||
'<strong>' . esc_attr( '30% OFF' ) . '</strong>', | ||
'<strong>' . esc_attr( 'BIGTREAT30' ) . '</strong>' | ||
) | ||
); | ||
?> | ||
</p> | ||
</div> | ||
</div> | ||
<div class="notice-footer"> | ||
<div class="footer-btn"> | ||
<a href="<?php echo esc_url( WCDM()->plugin_uri . '?utm_source=plugin&utm_medium=notice&utm_campaign=halloween-2024&discount=bigtreat30' ); ?>" class="primary halloween-upgrade-btn" target="_blank"> | ||
<span class="dashicons dashicons-cart"></span> | ||
<?php esc_html_e( 'Claim your discount!!', 'wc-donation-manager' ); ?> | ||
</a> | ||
<a href="#" class="halloween-remind-btn" data-snooze="<?php echo esc_attr( WEEK_IN_SECONDS ); ?>"> | ||
<span class="dashicons dashicons-clock"></span> | ||
<?php esc_html_e( 'Remind me later', 'wc-donation-manager' ); ?> | ||
</a> | ||
<a href="#" class="primary halloween-remove-btn" data-dismiss> | ||
<span class="dashicons dashicons-remove"></span> | ||
<?php esc_html_e( 'Never show this again!', 'wc-donation-manager' ); ?> | ||
</a> | ||
<a href="#" class="primary halloween-dismiss-btn" data-dismiss> | ||
<span class="dashicons dashicons-dismiss"></span> | ||
<?php esc_html_e( 'DISMISS', 'wc-donation-manager' ); ?> | ||
</a> | ||
</div> | ||
<strong class="halloween-footer-text"><?php esc_html_e( 'Valid until November 10, 2024', 'wc-donation-manager' ); ?></strong> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/** | ||
* Admin notice for review. | ||
* | ||
* @package WooCommerceDonationManager | ||
* @since 1.0.0 | ||
* @return void | ||
*/ | ||
|
||
defined( 'ABSPATH' ) || exit; | ||
|
||
?> | ||
<div class="notice-body"> | ||
<div class="notice-icon"> | ||
<img src="<?php echo esc_attr( WCDM()->get_assets_url( 'images/plugin-icon.png' ) ); ?>" alt="WooCommerce Donation Manager"> | ||
</div> | ||
<div class="notice-content"> | ||
<h3> | ||
<?php esc_html_e( 'Enjoying WooCommerce Donation Manager?', 'wc-donation-manager' ); ?> | ||
</h3> | ||
<p> | ||
<?php | ||
echo wp_kses_post( | ||
sprintf( | ||
// translators: %1$s: WooCommerce Donation Manager WP ORG link, %2$s: Coupon code. | ||
__( 'We hope you had a wonderful experience using %1$s. Please take a moment to show us your support by leaving a 5-star review on <a href="%2$s" target="_blank"><strong>WordPress.org</strong></a>. Thank you! 😊', 'wc-donation-manager' ), | ||
'<a href="ttps://wordpress.org/plugins/wc-donation-manager/" target="_blank"><strong>WooCommerce Donation Manager</strong></a>', | ||
'https://wordpress.org/support/plugin/wc-donation-manager/reviews/?filter=5#new-post' | ||
) | ||
); | ||
?> | ||
</p> | ||
</div> | ||
</div> | ||
<div class="notice-footer"> | ||
<a class="primary" href="https://wordpress.org/support/plugin/wc-donation-manager/reviews/?filter=5#new-post" target="_blank"> | ||
<span class="dashicons dashicons-heart"></span> | ||
<?php esc_html_e( 'Sure, I\'d love to help!', 'wc-donation-manager' ); ?> | ||
</a> | ||
<a href="#" data-snooze> | ||
<span class="dashicons dashicons-clock"></span> | ||
<?php esc_html_e( 'Maybe later', 'wc-donation-manager' ); ?> | ||
</a> | ||
<a href="#" data-dismiss> | ||
<span class="dashicons dashicons-smiley"></span> | ||
<?php esc_html_e( 'I\'ve already left a review', 'wc-donation-manager' ); ?> | ||
</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/** | ||
* Admin notice for upgrade. | ||
* | ||
* @package WooCommerceDonationManager | ||
* @since 1.0.0 | ||
* @return void | ||
*/ | ||
|
||
defined( 'ABSPATH' ) || exit; | ||
|
||
?> | ||
<div class="notice-body"> | ||
<div class="notice-icon"> | ||
<img src="<?php echo esc_attr( WCDM()->get_assets_url( 'images/plugin-icon.png' ) ); ?>" alt="WooCommerce Donation Manager"> | ||
</div> | ||
<div class="notice-content"> | ||
<h3><?php esc_attr_e( 'Flash Sale Alert!', 'wc-donation-manager' ); ?></h3> | ||
<p> | ||
<?php | ||
echo wp_kses_post( | ||
sprintf( | ||
// translators: %1$s: WooCommerce Donation Manager ORG link, %2$s: Coupon code. | ||
__( 'Get access to %1$s with a <strong>20%% discount</strong> for the next <strong>72 hours</strong> only! Use coupon code %2$s at checkout. Hurry up, the offer ends soon.', 'wc-donation-manager' ), | ||
'<a href="https://pluginever.com/?utm_source=plugin&utm_medium=notice&utm_campaign=flash-sale" target="_blank"><strong>All Plugins</strong></a>', | ||
'<strong>FLASH20</strong>' | ||
) | ||
); | ||
?> | ||
</p> | ||
</div> | ||
</div> | ||
<div class="notice-footer"> | ||
<a class="primary" href="https://pluginever.com/?utm_source=plugin&utm_medium=notice&utm_campaign=flash-sale" target="_blank"> | ||
<span class="dashicons dashicons-cart"></span> | ||
<?php esc_attr_e( 'Claim discount ow', 'wc-donation-manager' ); ?> | ||
</a> | ||
<a href="#" data-snooze="<?php echo esc_attr( WEEK_IN_SECONDS ); ?>"> | ||
<span class="dashicons dashicons-clock"></span> | ||
<?php esc_attr_e( 'Maybe later', 'wc-donation-manager' ); ?> | ||
</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.