.backuply_button { background-color: #4CAF50; /* Green */ border: none; color: white; padding: 8px 16px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; margin: 4px 2px; -webkit-transition-duration: 0.4s; /* Safari */ transition-duration: 0.4s; cursor: pointer; } .backuply_button:focus{ border: none; color: white; } .backuply_button1 { color: white; background-color: #4CAF50; border:3px solid #4CAF50; } .backuply_button1:hover { box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19); color: white; border:3px solid #4CAF50; } .backuply_button2 { color: white; background-color: #0085ba; } .backuply_button2:hover { box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19); color: white; } .backuply_button3 { color: white; background-color: #365899; } .backuply_button3:hover { box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19); color: white; } .backuply_button4 { color: white; background-color: rgb(66, 184, 221); } .backuply_button4:hover { box-shadow: 0 6px 8px 0 rgba(0,0,0,0.24), 0 9px 25px 0 rgba(0,0,0,0.19); color: white; } .backuply_promo-close{ float:right; text-decoration:none; margin: 5px 10px 0px 0px; } .backuply_promo-close:hover{ color: red; } #backuply_promo li { list-style-position: inside; list-style-type: circle; } .backuply-loc-types { display:flex; flex-direction: row; align-items:center; flex-wrap: wrap; } .backuply-loc-types li{ list-style-type:none !important; margin-right: 10px; } .backuply-free-trial{ position:relative; width:99%; background-color: #000; color:#FFF; font-weight:500; border-radius:4px; padding:20px; box-sizing:border-box; margin-top: 10px; } .backuply-promo-dismiss{ position:absolute; top:10px; right:10px; color:white; } '; function backuply_base_promo(){ echo '
Dismiss

You have been using Backuply for few days and we hope we were able to add some value through Backuply.

If you like our plugin would you please show some love by doing actions like

Upgrade to Pro Rate it 5★\'s Like Us on Facebook Tweet about Backuply

'; } function backuply_holiday_offers(){ $time = date('nj'); if($time == 1225 || $time == 1224){ backuply_christmas_offer(); } if($time == 11){ backuply_newyear_offer(); } } function backuply_christmas_offer(){ echo '
Dismiss

Backuply Wishes you Merry Christmas 🎄

We are offering 25% off on every Backuply Plan today, so upgrade to Backuply Pro now and forget the need to create backups manully with Backuply\'s Auto Backups.

Upgrade to Pro
'; } function backuply_newyear_offer(){ echo '
Dismiss

Backuply Wishes you a Happy New Year 🎉

We are offering 25% off on every Backuply Plan today, so upgrade to Backuply Pro now and forget the need to create backups manully with Backuply\'s Auto Backups.

Upgrade to Pro
'; } function backuply_free_trial(){ global $backuply, $error; $has_license = false; if(defined('BACKUPLY_PRO') && !empty($backuply['license']['license'])){ $has_license = true; } $verification_wait = false; if(empty($backuply['bcloud_key']) && !empty($_GET['license']) && !empty($_GET['token'])){ if($_GET['token'] !== get_transient('bcloud_trial_token')){ $error[] = 'Your Security Check failed!'; } else { delete_transient('bcloud_trial_token'); $license = sanitize_text_field($_GET['license']); if(!empty($backuply['license'])){ $error[] = __('You already have a license linked to this WordPress install, you dont need trial license you can directly add Backuply Cloud', 'backuply'); } backuply_update_trial_license($license); if(empty($error)){ $verification_wait = true; } } } $token = wp_generate_password(32,false); set_transient('bcloud_trial_token', $token, 3600); echo '
Dismiss

Stress free backups in Cloud

'; if(defined('BACKUPLY_PRO')){ echo 'With Backuply Pro you get 10GB free storage on Backuply Cloud. Start backing up your website today !
Backuply Cloud is a secure and reliable cloud backup service that makes it easy to protect your website data.'; } else { echo 'Try Backuply Cloud for free for 30 days with 10GB of storage. With just a click store your WordPress backups on our Cloud. Backups are the best form of security, never lose your data with Backuply Cloud.'; } echo '

'; } function backuply_promo_scripts(){ wp_enqueue_script('backuply-promo', BACKUPLY_URL . '/assets/js/promo.js', array('jquery', 'jquery-ui-dialog'), BACKUPLY_VERSION); wp_enqueue_style('backuply-dialog', BACKUPLY_URL . '/assets/css/base-jquery-ui.css', [], BACKUPLY_VERSION); wp_localize_script('backuply-promo', 'backuply_promo', array( 'nonce' => wp_create_nonce('backuply_trial_nonce'), 'ajax' => admin_url('admin-ajax.php') )); } function backuply_update_trial_license($license){ global $backuply, $error; $resp = wp_remote_get(BACKUPLY_API.'/license.php?license='.$license.'&url='.rawurlencode(site_url()), array('timeout' => 30)); $json = json_decode($resp['body'], true); if(empty($json['license'])){ $error[] = __('There was issue fetching License details', 'backuply'); } $backuply['license'] = $json; update_option('backuply_license', $backuply['license']); } function backuply_regular_offer(){ // The time period this should be visible to the users. if(time() > strtotime('20 October 2023')){ return; } echo '
Dismiss for 6 months

Backuply is offering a 30% discount on all subscription plans today! Upgrade to Backuply Pro and receive up to 100 GB of cloud storage, and forget about manually creating backups with our automatic backups feature. Use the code NEW30 to receive this offer.

Upgrade to Pro
'; } function backuply_check_expires(){ global $backuply; // We do not want to show the expiry notice if the license is by SoftWP. if(!empty($backuply['license']) && !empty($backuply['license']['has_plid'])){ return; } $current_timestamp = time(); $expiration_timestamp = strtotime($backuply['license']['expires']); $time_diff = $expiration_timestamp - $current_timestamp; // Renew link $backuply_user_license = $backuply['license']['license']; $backuply_user_plan = $backuply['license']['plan']; $backuply_renew_url = 'https://www.softaculous.com/clients?ca=backuply_buy&plan=' . $backuply_user_plan . '&license=' . $backuply_user_license; if($time_diff > 0 && $time_diff <= WEEK_IN_SECONDS){ $human_time = human_time_diff($current_timestamp, $expiration_timestamp); echo '
'.esc_html__('Dismiss for 60 days', 'backuply').'

' . sprintf(esc_html__('Alert : Your Backuply license will expire in %s. Renew to keep getting updates!', 'backuply'), esc_html($human_time)).' ' . esc_html__('Click here to renew', 'backuply') . '

'; } else if($time_diff <= 0){ echo '
'.esc_html__('Dismiss for 60 days', 'backuply').'

' . esc_html__('Alert: Your Backuply license has expired. Please renew immediately to keep getting updates ', 'backuply').' ' . esc_html__('Click here to renew', 'backuply') . '

'; } }