/** * Shows the trial and premium notices. * * @see factory_notices * @since 1.0.0 */ function onp_sl_upgrade_to_premium_notices($notices) { global $sociallocker; $forceToShowNotices = defined('ONP_DEBUG_SL_OFFER_PREMIUM') && ONP_DEBUG_SL_OFFER_PREMIUM; if ((!$sociallocker->license || $sociallocker->license->build !== 'free' || $sociallocker->build !== "free") && !$forceToShowNotices) { return $notices; } $alreadyActivated = get_option('onp_trial_activated_' . $sociallocker->pluginName, false); if ($alreadyActivated) { $message = __('5 extra stunning themes, 8 social buttons, the blurring effect, advanced options, new features & updates every week, dedicated support and more.', 'plugin-sociallocker'); $header = __('Drive more traffic and build quality followers with Social Locker Premium!', 'plugin-sociallocker'); $url = onp_licensing_325_get_purchase_url($sociallocker); } else { $message = __('5 extra stunning themes, 8 social buttons, the blurring effect, advanced options, new features & updates every week, dedicated support and more. Drive more traffic and build quality followers with Social Locker Premium!', 'plugin-sociallocker'); $header = __('Try the premium version for 7 days for free!', 'plugin-sociallocker'); $url = onp_licensing_325_manager_link($sociallocker->pluginName, 'activateTrial', false); } $closed = get_option('factory_notices_closed', array()); $lastCloase = isset($closed['onp-sl-offer-to-purchase']) ? $closed['onp-sl-offer-to-purchase']['time'] : 0; // shows every 10 days if (time() - $lastCloase > 60 * 60 * 10 || $forceToShowNotices) { if (!$alreadyActivated) { $notices[] = array('id' => 'onp-sl-offer-to-purchase', 'class' => 'call-to-action ', 'icon' => 'fa fa-arrow-circle-o-up', 'header' => '<span class="onp-hightlight">' . $header . '</span>', 'message' => $message, 'plugin' => $sociallocker->pluginName, 'where' => array('plugins', 'dashboard', 'edit'), 'buttons' => array(array('title' => '<i class="fa fa-arrow-circle-o-up"></i> ' . __('Activate Premium', 'plugin-sociallocker'), 'class' => 'button button-primary', 'action' => $url), array('title' => __('No, thanks, not now', 'plugin-sociallocker'), 'class' => 'button', 'action' => 'x'))); } else { $notices[] = array('id' => 'onp-sl-offer-to-purchase', 'class' => 'call-to-action ', 'icon' => 'fa fa-arrow-circle-o-up', 'header' => '<span class="onp-hightlight">' . $header . '</span>', 'message' => $message, 'plugin' => $sociallocker->pluginName, 'where' => array('plugins', 'dashboard', 'edit'), 'buttons' => array(array('title' => '<i class="fa fa-arrow-circle-o-up"></i> ' . __('Learn More & Upgrade', 'plugin-sociallocker'), 'class' => 'button button-primary', 'action' => $url), array('title' => __('No, thanks, not now', 'plugin-sociallocker'), 'class' => 'button', 'action' => 'x'))); } } return $notices; }
/** * Shows 'Get more features!' * * @sinve 1.0.0 * @return void * */ public function premium() { ?> <div class="onp-help-section"> <h1><?php _e('Upgrade to Premium!', 'sociallocker'); ?> </h1> <p> The plugin you're using is a free edition of the premium plugin <a href="<?php echo onp_licensing_325_get_purchase_url($this->plugin); ?> ">Image Elevator</a> sold on CodeCanyon. </p> <p class='onp-remark'> <span class="onp-inner-wrap"> The premium version provides more features improving your productivity when you're working with images, allows you to rename images after pasting, resize and compress them on the fly. </span> </p> </div> <div class="onp-help-section"> <h2><i class="fa fa-star-o"></i> Comparation of versions</h2> <table class="table table-bordered" id="onp-imgevr-version-comparation"> <thead> <tr> <th></th> <th>Free</th> <th class="onp-imgevr-premium">Premium</th> </tr> </thead> <tbody> <tr> <td class="onp-imgevr-title">Pasting images from clipboard</td> <td class="onp-imgevr-yes">yes</td> <td class="onp-imgevr-yes onp-imgevr-premium">yes</td> </tr> <tr> <td class="onp-imgevr-title">Adding pasted images to the Media Library</td> <td class="onp-imgevr-yes">yes</td> <td class="onp-imgevr-yes onp-imgevr-premium">yes</td> </tr> <tr> <td class="onp-imgevr-title">Renaming any images</td> <td class="onp-imgevr-no">no</td> <td class="onp-imgevr-yes onp-imgevr-premium"><strong>yes</strong></td> </tr> <tr> <td class="onp-imgevr-title">Resizing images on the fly (<strong>new!</strong>)</td> <td class="onp-imgevr-no">no</td> <td class="onp-imgevr-yes onp-imgevr-premium"><strong>yes</strong></td> </tr> <tr> <td class="onp-imgevr-title">Compressing images on the fly</td> <td class="onp-imgevr-no">no</td> <td class="onp-imgevr-yes onp-imgevr-premium"><strong>yes</strong></td> </tr> <tr> <td class="onp-imgevr-title">Updates</td> <td class="onp-imgevr-no">not guaranteed</td> <td class="onp-imgevr-yes onp-imgevr-premium">primary updates</td> </tr> <tr> <td class="onp-imgevr-title">Support</td> <td class="onp-imgevr-no">not guaranteed</td> <td class="onp-imgevr-yes onp-imgevr-premium">guaranteed</td> </tr> <tr class="onp-imgevr-actions"> <td></td> <td></td> <td class="onp-imgevr-premium"> <a class="button button-primary" href="<?php echo onp_licensing_325_get_purchase_url($this->plugin); ?> ">Upgrade for $13 only!</a> </td> </tr> </tbody> </table> </div> <div class="onp-help-section"> <h2><i class="fa fa-star-o"></i> Rename images and improve SEO</h2> <p>By default Wordpress doesn't allow to change file names of the images in your posts. But the relevant filename is good for SEO as well as the relevant headline.</p> <p>The premium version of the Image Elevator allows you to rename images easily.</p> <p class='onp-img'> <img src='<?php echo IMGEVR_PLUGIN_URL . '/assets/admin/img/how-to-use/renaming-feature.gif'; ?> ' /> </p> </div> <div class="onp-help-section"> <h2><i class="fa fa-star-o"></i> Resize images on the fly</h2> <p>Do you want all pasted images to match a format of your blog? Or want to quickly generate thumbnails for pasted images keeping the original images available at a click?</p> <p>Turn of the resizing feature in the premium version in order to resize all pasted images automatically and effortlessly.</p> <p class='onp-img'> <img src='<?php echo IMGEVR_PLUGIN_URL . '/assets/admin/img/how-to-use/resizing.png'; ?> ' /> </p> </div> <div class="onp-help-section"> <h2><i class="fa fa-star-o"></i> Compress images on the fly</h2> <p>When you paste images, especially photos, they can be quite large and add extra loads on your website.</p> <p>Turn on the compression feature in the premium version, set the max allowed size for pasted images and this problem is over. Your images will be automatically converted to jpeg with specified the quality value.</p> <p class='onp-img'> <img src='<?php echo IMGEVR_PLUGIN_URL . '/assets/admin/img/how-to-use/compression.png'; ?> ' /> </p> </div> <div class="onp-help-section"> <h2><i class="fa fa-star-o"></i> Need other features?</h2> <p>Just let us know. Were closely working with our customers, getting suggestions by which we fill our ToDo list. <a href="http://support.onepress-media.com/create-ticket/">Click here</a> to tell us about your needs.</p> <?php }
/** * Renders content of the metabox. * * @see FactoryMetaboxes321_Metabox * @since 1.0.0 * * @return void */ public function html() { global $sociallocker; $alreadyActivated = get_option('onp_trial_activated_' . $sociallocker->pluginName, false); ?> <div class="factory-bootstrap-329 factory-fontawesome-320"> <div class="sl-header"> <strong><?php _e('More Features?', 'signinlocker'); ?> </strong> <p><?php _e('You Use Only 30% of Social Locker!', 'signinlocker'); ?> </p> <?php if (FACTORY_FLAT_ADMIN) { ?> <div class="progress progress-striped"> <div class="progress-bar" role="progressbar" aria-valuenow="30" aria-valuemin="0" aria-valuemax="100" style="width: 30%;"> <span class="sr-only"><?php _e('30% Complete', 'signinlocker'); ?> </span> </div> </div> <?php } else { ?> <div class="progress progress-danger progress-striped active"> <div class="bar" style="width: 30%;"></div> </div> <?php } ?> </div> <div class="sl-seporator"></div> <ul> <li><span><?php _e('More Sign-In Options (+2)', 'signinlocker'); ?> </span></li> <li><span><?php _e('More Beautiful Themes (+2)', 'signinlocker'); ?> </span></li> <li><span><?php _e('Blurring Effect', 'signinlocker'); ?> </span></li> <li><span><?php _e('Advanced Options (+8)', 'signinlocker'); ?> </span></li> <li><span><?php _e('Premium Support', 'signinlocker'); ?> </span></li> </ul> <div class="sl-seporator"></div> <?php if ($alreadyActivated || get_option('onp_sl_skip_trial', false)) { ?> <div class="sl-footer"> <?php echo sprintf(__('<a href="%s" class="btn btn-primary btn-large">Get Premium for $24<br /><span>(it will take a pair of minutes)</span></a>', 'signinlocker'), onp_licensing_325_get_purchase_url($sociallocker, 'more-features'), onp_licensing_325_manager_link($sociallocker->pluginName, 'activateTrial', false)); ?> </div> <?php } else { ?> <div class="sl-footer"> <?php echo sprintf(__('<a href="%s" class="btn btn-primary btn-large">Try 7-days Trial Version<br /><span>(activate by one click)</span></a><a href="%s" class="sl-buy"> or <strong>buy</strong> the full premium version now!</a>', 'signinlocker'), onp_licensing_325_manager_link($sociallocker->pluginName, 'activateTrial', false), onp_licensing_325_get_purchase_url($sociallocker, 'more-features')); ?> </div> <?php } ?> <div style="display: none"> <div class="demo-social-options"></div> <div class="demo-themes"></div> <div class="demo-blurring-effect"></div> <div class="demo-advanced-options"></div> </div> </div> <?php }
/** * Returns an URL where the user can purchaes the plugin. */ function onp_sl_get_premium_url($campaign = 'na') { global $sociallocker; return onp_licensing_325_get_purchase_url($sociallocker, $campaign); }
/** * Shows current license type. */ public function indexAction() { $licenseManager = $license = $this->plugin->license; $updatesManager = $this->plugin->updates; $licenseKey = isset($_POST['licensekey']) ? htmlspecialchars(trim($_POST['licensekey'])) : null; $scope = isset($_GET['scope']) ? $_GET['scope'] : null; $error = $response = null; // processing a form submission for activation a key if (isset($_POST['licensekey'])) { $scope = 'submit-key'; $licenseKey = htmlspecialchars(trim($_POST['licensekey'])); if (empty($licenseKey)) { $error = new WP_Error('FORM:KeyEmpty', __('Please enter your license key to continue.', 'onp_licensing_325')); } else { $response = $licenseManager->activateKey($licenseKey); if (is_wp_error($response)) { $error = $response; } else { $licenseKey = null; } } // displaying results of other actions (deletion of a key, checking updates and so on) } else { $code = isset($_GET['code']) ? $_GET['code'] : null; $message = isset($_GET['message']) ? $_GET['message'] : null; if ($code && $message) { $error = new WP_Error($code, urldecode(base64_decode($message))); } } // preparing some data to display $licenseData = $licenseManager->data; $remained = round(($licenseData['Expired'] - time()) / (60 * 60 * 24), 2); $isInfinity = empty($licenseData['Expired']); // preparing an error data to dispaly if ($error) { $parts = explode(':', $error->get_error_code()); $errorSource = $parts[0]; } // creating a customer account if it's required if ($response && !$error && (isset($licenseManager->data['KeyBound']) && !$licenseManager->data['KeyBound'])) { $this->redirectToAction('createAccount', array('onp_ref' => 'key-activation')); } if ($response && !$error && (isset($licenseManager->data['KeyBound']) && $licenseManager->data['KeyBound'])) { $this->redirectToAction('finish'); } ?> <div class="factory-bootstrap-329 factory-fontawesome-320 onp-page-wrap <?php echo $licenseData['Category']; ?> -license-manager-content" id="license-manager"> <a id="onp-hide-license-manager" href="<?php $this->actionUrl('hideLM'); ?> "> <i class="fa fa-eye-slash"></i><?php _e('Hide License Manager'); ?> </a> <?php if ($error) { ?> <?php $this->showError($error, $scope); ?> <?php } else { ?> <div class="license-message <?php echo $licenseData['Category']; ?> -license-message"> <?php if ($scope == 'delete-key') { ?> <div class="alert alert-normal alert-warning-icon"> <strong><?php _e('The key has been deleted successfully.', 'onp_licensing_325'); ?> </strong> <p><?php _e('Please check the <a href="plugins.php">Plugins</a> page and update the plugin to complete deletion if it\'s needed.', 'onp_licensing_325'); ?> </p> </div> <?php } ?> <?php if ($scope == 'reset-license') { ?> <div class="alert alert-success"> <?php _e('Your license details have been reset successfully.', 'onp_licensing_325'); ?> </div> <?php } ?> <?php if ($scope == 'check-updates') { ?> <div class="alert alert-normal"> <strong><?php _e('The updates have been checked successfully.', 'onp_licensing_325'); ?> </strong> <p> <?php if ($updatesManager->isActualVersion()) { ?> <?php _e('You use the actual version of the plugin.', 'onp_licensing_325'); ?> <?php } else { ?> <?php if ($updatesManager->needChangeAssembly()) { ?> <?php printf(__('You need to upgrade to the %1$s version. <a href="plugins.php">Click here</a> to get the update.', 'onp_licensing_325'), $this->plugin->license->build); ?> <?php } else { ?> <?php printf(__('The %1$s version is available to download. <a href="plugins.php">Click here</a> to get the update.', 'onp_licensing_325'), $updatesManager->lastCheck['Build'] . '-' . $updatesManager->lastCheck['Version']); ?> <?php } ?> <?php } ?> </p> </div> <?php } ?> </div> <?php } ?> <div class="onp-container"> <div class="license-details"> <?php ?> <?php if ($licenseManager->hasUpgrade()) { ?> <a href="<?php onp_licensing_325_purchase_url($this->plugin); ?> " id="purchase-premium"> <span class="btn btn-gold btn-inner-wrap"> <?php if (!empty($this->purchasePrice)) { ?> <i class="fa fa-star"></i> <?php printf(__('Upgrade to Premium for %1$s', 'onp_licensing_325'), $this->purchasePrice); ?> <i class="fa fa-star"></i></i> <?php } else { ?> <i class="fa fa-star"></i> <?php _e('Upgrade to Premium', 'onp_licensing_325'); ?> <i class="fa fa-star"></i></i> <?php } ?> </span> </a> <?php } ?> <?php ?> <?php if (empty($this->plugin->pluginTitle)) { ?> <p><?php _e('Your current license:', 'onp_licensing_325'); ?> </p> <?php } else { ?> <p><?php printf(__('Your current license for %1$s:', 'onp_licensing_325'), $this->plugin->pluginTitle); ?> </p> <?php } ?> <div class="license-details-block <?php echo $licenseData['Category']; ?> -details-block"> <?php if ($licenseManager->hasKey()) { ?> <a href="<?php $this->actionUrl('deleteKey'); ?> " class="btn btn-default btn-small license-delete-button"><i class="icon-remove-sign"></i> <?php _e('Delete Key', 'onp_licensing_325'); ?> </a> <?php } ?> <h3><?php echo $licenseData['Title']; ?> </h3> <?php if ($licenseManager->hasKey()) { ?> <div class="licanse-key-identity"><?php echo $licenseData['Key']; ?> </div> <?php } ?> <div class="licanse-key-description"> <?php if ($licenseManager->data['Build'] !== 'free') { ?> <?php if ($licenseManager->data['Category'] == 'free') { ?> <?php if ($this->codecanyon) { ?> <p> <?php _e('Please, activate the plugin to unlock its features. Enter the key you received with the plugin into the form below. Don\'t know where the key is? <a href="#" id="open-faq">Click here</a>.', 'onp_licensing_325'); ?> </p> <?php } else { ?> <p> <?php _e('Please, activate the plugin to unlock its features. Enter the key you received with the plugin into the form below.', 'onp_licensing_325'); ?> </p> <?php } ?> <?php if ($this->trial) { ?> <p class="activate-trial-hint"> <?php printf(__('Also you can activate a <a href="%1$s">trial version</a> for 7 days to test the plugin on this site.', 'onp_licensing_325'), $this->getActionUrl('activateTrial')); ?> </p> <?php } ?> <?php } else { ?> <?php echo $licenseData['Description']; ?> <?php } ?> <?php } else { ?> <?php if ($licenseManager->data['Category'] == 'free') { ?> <p><?php _e('Public License is a GPLv2 compatible license allowing you to change and use this version of the plugin for free. Please keep in mind this license covers only free edition of the plugin. Premium versions are distributed with other type of a license.'); ?> </p> <?php if ($this->trial) { ?> <p class="activate-trial-hint"> <?php printf(__('You can <a href="%1$s">activate</a> a premium version for a trial period (7 days).', 'onp_licensing_325'), $this->getActionUrl('activateTrial')); ?> <?php printf(__('Or click <a target="_blank" href="%1$s">here</a> to learn more about the premium version.', 'onp_licensing_325'), onp_licensing_325_get_purchase_url($this->plugin)); ?> </p> <?php } ?> <?php } else { ?> <?php echo $licenseData['Description']; ?> <?php } ?> <?php } ?> </div> <table class="license-params" colspacing="0" colpadding="0"> <tr> <td class="license-param license-param-domain"> <span class="license-value"><?php echo $this->domain; ?> </span> <span class="license-value-name"><?php _e('domain', 'onp_licensing_325'); ?> </span> </td> <td class="license-param license-param-version"> <span class="license-value"><?php echo $this->plugin->version; ?> <small><?php _e('version', 'onp_licensing_325'); ?> </small></span> <?php if ($updatesManager->isVersionChecked()) { ?> <?php if ($updatesManager->isActualVersion()) { ?> <span class="license-value-name"><?php _e('up-to-date', 'onp_licensing_325'); ?> </span> <?php } else { ?> <?php if ($updatesManager->needChangeAssembly()) { ?> <span class="license-value-name"> <a href="plugins.php" class="link-to-upgrade"> <?php printf(__('upgrade to %s', 'onp_licensing_325'), $this->plugin->license->build); ?> </a> </span> <?php } else { ?> <span class="license-value-name"> <a href="plugins.php" class="link-to-upgrade"> <?php echo $updatesManager->lastCheck['Build']; ?> -<?php echo $updatesManager->lastCheck['Version']; ?> <?php _e('available', 'onp_licensing_325'); ?> </a> </span> <?php } ?> <?php } ?> <?php } else { ?> <span class="license-value-name"><span><?php _e('up-to-date', 'onp_licensing_325'); ?> </span></span> <?php } ?> </td> <td class="license-param license-param-days"> <span class="license-value"><?php echo $licenseManager->data['Build']; ?> </span> <span class="license-value-name"><?php _e('assembly', 'onp_licensing_325'); ?> </span> </td> <td class="license-param license-param-days"> <?php if ($licenseManager->isExpired()) { ?> <span class="license-value"><?php _e('EXPIRED!', 'onp_licensing_325'); ?> </span> <span class="license-value-name"><?php _e('please update the key', 'onp_licensing_325'); ?> </span> <?php } else { ?> <span class="license-value"> <?php if ($isInfinity) { _e('infinity', 'onp_licensing_325'); } else { ?> <?php echo $remained; ?> <small> <?php _e('day(s)', 'onp_licensing_325'); ?> </small> <?php } ?> </span> <span class="license-value-name"><?php _e('remained', 'onp_licensing_325'); ?> </span> <?php } ?> </td> </tr> </table> </div> </div> <div class="license-input"> <form action="<?php $this->actionUrl("index"); ?> " method="post"> <?php if ($this->premium) { ?> <p><?php _e('Have a key to activate the premium version? Paste it here:', 'onp_licensing_325'); ?> <p> <?php } else { ?> <p><?php _e('Have a key to activate the plugin? Paste it here:', 'onp_licensing_325'); ?> <p> <?php } ?> <a href="#" class="btn btn-default" id="license-submit"> <?php _e('Submit Key', 'onp_licensing_325'); ?> </a> <div class="license-key-wrap"> <input type="text" id="license-key" name="licensekey" value="<?php echo $licenseKey; ?> " class="form-control" /> </div> <?php if ($this->premium) { ?> <p style="margin-top: 10px;"> <?php printf(__('<a href="%1$s">Lean more</a> about the premium version and get the license key to activate it now!', 'onp_licensing_325'), onp_licensing_325_get_purchase_url($this->plugin)); ?> </p> <?php } else { ?> <p style="margin-top: 10px;"> <?php printf(__('<a href="%1$s">Lean more</a> about this plugin and get the license key to activate it now!', 'onp_licensing_325'), onp_licensing_325_get_purchase_url($this->plugin)); ?> </p> <?php } ?> </form> </div> </div> <div id="plugin-update-block"> <?php if ($licenseManager->data['Build'] !== 'free') { ?> <?php if (!$updatesManager->isVersionChecked()) { ?> <?php if (isset($updatesManager->lastCheck['Checked'])) { ?> <?php printf(__('The upadtes were checked at <strong>%1$s</strong>.', 'onp_licensing_325'), date('g:i a, j M y', $updatesManager->lastCheck['Checked'])); ?> <?php } else { ?> <?php _e('The updates were checked <strong>never</strong>.', 'onp_licensing_325'); ?> <?php } ?> <?php } else { ?> <?php if ($updatesManager->isActualVersion()) { ?> <?php printf(__('The updates were checked at <strong>%1$s</strong>, you use the up-to-date version. ', 'onp_licensing_325'), date('g:i a, j M y', $updatesManager->lastCheck['Checked'])); ?> <?php } else { ?> <?php printf(__('The updates were checked at <strong>%1$s</strong>, <strong>%2$s</strong>. ', 'onp_licensing_325'), date('g:i a, j M y', $updatesManager->lastCheck['Checked']), $updatesManager->lastCheck['Version']); ?> <?php } ?> <?php } ?> <?php printf(__('Click <a href="%1$s">here</a> to check updates manually.', 'onp_licensing_325'), $this->getActionUrl('checkUpdates')); ?> <?php } ?> <span class="gray-link">[ <a href="<?php echo $this->getActionUrl('internalKeys'); ?> "><?php _e('internal keys', 'onp_licensing_325'); ?> </a> ]</span> </div> <?php if ($this->faq) { ?> <div id="faq-block"> <ul> <li> <a class="faq-header" id="how-to-find-the-key"> <?php _e('I purchased the plugin on CodeCanyon, but I cannot find the license key. Where is it?', 'onp_licensing_325'); ?> </a> <div> <p> <?php _e('If you purchased the plugin on CodeCanyon, visit your Downloads section and click Licence Certificate.', 'onp_licensing_325'); ?> <?php _e('Find Item Purchase Code in the text document and paste it into the form above.', 'onp_licensing_325'); ?> </p> <p style="text-align: center;"> <img src="<?php echo ONP_LICENSING_325_URL . '/assets/img/how-to-find-key.png'; ?> " /> </p> </div> </li> <li> <a class="faq-header"> <?php _e('The plugin I purchased comes with the bonus. Where I can find a key to activate the bonus?', 'onp_licensing_325'); ?> </a> <div> <p> <?php _e('You can activate the bonus plugin via the key you got for the principal plugin.', 'onp_licensing_325'); ?> </p> </div> </li> <li> <a class="faq-header"> <?php _e('Is it possible to get the premium version without the License Manager?', 'onp_licensing_325'); ?> </a> <div> <p> <?php _e('Yes, it\'s possible if you want to distribute the plugin as a part of your product. Please contact us to discuss details: support@onepress-media.com', 'onp_licensing_325'); ?> </p> </div> </li> <li> <a class="faq-header"> <?php _e('I see the message "... Please install another plugin assembly (premium) ...". How to fix?', 'onp_licensing_325'); ?> </a> <div> <p> <?php printf(__('If you upgraded the plugin from the free version up to the premium version, it\'s okay, just visit the page <a href="%s"><strong>Plugins</strong></a> and download the update.', 'onp_licensing_325'), admin_url('plugins.php')); ?> <?php printf(__('If you have been using the premium version and now would like to use the free version but get this message, <a href="%s"><strong>click here</strong></a> to reset your license details.', 'onp_licensing_325'), $this->getActionUrl('resetLicense')); ?> </p> </div> </li> </ul> </div> <?php } ?> </div> <?php }
/** * Adds notices to display. * * Calls on the hook 'factory_notices_[plugin_name]' * * @param mixed[] $notices * @return mixed[] */ function addNotices($notices) { // show messages only for administrators if (!factory_325_is_administrator()) { return $notices; } $closed = get_option('factory_notices_closed', array()); $time = 0; if (isset($closed[$this->plugin->pluginName . '-key-not-bound'])) { $time = $closed[$this->plugin->pluginName . '-key-not-bound']['time']; } // shows the key binding message only if changing the assembly is not required $forceBindingMessage = defined('ONP_DEBUG_SHOW_BINDING_MESSAGE') && ONP_DEBUG_SHOW_BINDING_MESSAGE; if ($time + 60 * 60 * 24 <= time() && (!$this->plugin->updates || !$this->plugin->updates->needChangeAssembly()) || $forceBindingMessage) { $keyBound = get_option('onp_bound_message_' . $this->plugin->pluginName, false); if ($keyBound && $this->plugin->license && $this->plugin->license->key && $this->needToProtect() || $forceBindingMessage) { $notices[] = array('id' => $this->plugin->pluginName . '-key-not-bound', 'class' => 'call-to-action', 'icon' => 'fa fa-frown-o', 'header' => __('Your license key is not protected!', 'onp_licensing_325'), 'message' => sprintf(__('Bind your license key (for %s) to your email address in order to avoid theft (it will take just a couple of seconds).', 'onp_licensing_325'), $this->plugin->options['title']), 'plugin' => $this->plugin->pluginName, 'buttons' => array(array('class' => 'btn btn-primary', 'title' => '<i class="fa fa-key"></i> ' . sprintf(__('Protect my key: %s', 'onp_licensing_325'), '<i>' . $this->plugin->license->key . '</i>'), 'action' => '?' . http_build_query(array('fy_page' => 'license-manager', 'fy_action' => 'createAccount', 'fy_plugin' => $this->plugin->pluginName))), array('title' => __('Hide this message', 'onp_licensing_325'), 'class' => 'btn btn-default', 'action' => 'x'))); } } $forceTrialNotices = defined('ONP_DEBUG_TRIAL_EXPIRES') && ONP_DEBUG_TRIAL_EXPIRES !== false; $exipred = floatval($this->data['Expired']); if ($exipred != 0 || $forceTrialNotices) { $remained = round(($this->data['Expired'] - time()) / (60 * 60 * 24), 2); if ($forceTrialNotices) { $remained = ONP_DEBUG_TRIAL_EXPIRES; } if ($remained < 5 && $remained > 0) { $time = 0; if (isset($closed[$this->plugin->pluginName . '-key-estimate'])) { $time = $closed[$this->plugin->pluginName . '-key-estimate']['time']; } if ($time + 60 * 60 * 24 <= time() || $forceTrialNotices) { if ($this->type == 'trial' || $forceTrialNotices) { if ($remained <= 1) { $notices[] = array('id' => $this->plugin->pluginName . '-key-estimate', 'class' => 'call-to-action', 'icon' => 'fa fa-clock-o', 'header' => sprintf(__('The trial key for the %s will expire during the day!', 'onp_licensing_325'), $this->plugin->pluginTitle), 'message' => __('Don\'t forget to purchase the premium key or delete the trial key to use the free version of the plugin.', 'onp_licensing_325'), 'plugin' => $this->plugin->pluginName, 'buttons' => array(array('title' => '<i class="fa fa-arrow-circle-o-up"></i> ' . __('Buy a premium key now!', 'onp_licensing_325'), 'class' => 'btn btn-primary', 'action' => onp_licensing_325_get_purchase_url($this->plugin, 'trial-remained-1')), array('title' => __('Hide this message', 'onp_licensing_325'), 'class' => 'btn btn-default', 'action' => 'x'))); } else { $notices[] = array('id' => $this->plugin->pluginName . '-key-estimate', 'class' => 'call-to-action', 'icon' => 'fa fa-clock-o', 'header' => sprintf(__('The trial key for the %s will expire in %s days.', 'onp_licensing_325'), $this->plugin->pluginTitle, $remained), 'message' => __('Please don\'t forget to purchase the premium key or delete the trial key to use the free version of the plugin.', 'onp_licensing_325'), 'plugin' => $this->plugin->pluginName, 'buttons' => array(array('title' => '<i class="fa fa-arrow-circle-o-up"></i> ' . __('Buy a premium key now!', 'onp_licensing_325'), 'class' => 'btn btn-primary', 'action' => onp_licensing_325_get_purchase_url($this->plugin, 'trial-remained-' . $remained)), array('title' => __('Hide this message', 'onp_licensing_325'), 'class' => 'btn btn-default', 'action' => 'x'))); } } } } if ($this->isExpired() || $forceTrialNotices) { $notices[] = array('id' => $this->plugin->pluginName . '-key-expired', 'class' => 'call-to-action', 'icon' => 'fa fa-arrow-circle-o-up', 'header' => sprintf(__('The trial key for the %s has expired.', 'onp_licensing_325'), $this->plugin->pluginTitle), 'message' => __('Please purchase another key or delete the current key to use the free version of the plugin.', 'onp_licensing_325'), 'plugin' => $this->plugin->pluginName, 'buttons' => array(array('title' => '<i class="fa fa-arrow-circle-o-up"></i> ' . __('Buy a premium key now!', 'onp_licensing_325'), 'class' => 'btn btn-primary', 'action' => onp_licensing_325_get_purchase_url($this->plugin, 'trial-expired')), array('title' => __('Visit the license manager', 'onp_licensing_325'), 'class' => 'btn btn-default', 'action' => onp_licensing_325_get_manager_link($this->plugin->pluginName, 'index')))); } } return $notices; }
/** * Shows 'Get more features!' * * @sinve 1.0.0 * @return void * */ public function premium() { global $optinpanda; $alreadyActivated = get_option('onp_trial_activated_' . $optinpanda->pluginName, false); ?> <div class="onp-help-section"> <?php if (!$alreadyActivated) { ?> <h1><?php _e('Try Premium Version For 7 Days For Free!', 'bizpanda'); ?> </h1> <?php } else { ?> <h1><?php _e('Upgrade Opt-In Panda To Premium!', 'bizpanda'); ?> </h1> <?php } ?> <?php if (!$alreadyActivated) { ?> <p> <?php printf(__('The plugin you are using is a free version of the popular <a target="_blank" href="%s"> Opt-In Panda</a> plugin. We offer you to try the premium version for 7 days absolutely for free. We sure you will love it.', 'bizpanda'), onp_licensing_325_get_purchase_url($this->plugin)); ?> </p> <p> <?php _e('Check out the table below to know about the premium features.', 'bizpanda'); ?> </p> <?php } else { ?> <p> <?php _e('The plugin you are using is a free version of the popular <a target="_blank" href="%s"> Opt-In Panda plugin</a> sold on CodeCanyon.', 'bizpanda'); ?> <?php _e('Check out the table below to know about all the premium features.', 'bizpanda'); ?> </p> <?php } ?> </div> <div class="onp-help-section"> <h2><i class="fa fa-star-o"></i> Comparison of Free & Premium Versions</h2> <p>Click on the dotted title to learn more about a given feature.</p> <table class="table table-bordered onp-how-comparation"> <thead> <tr> <th></th> <th>Free</th> <th class="onp-how-premium">Premium</th> </tr> </thead> <tbody> <tr> <td class="onp-how-title">Unlimited Lockers</td> <td class="onp-how-yes">yes</td> <td class="onp-how-yes onp-how-premium">yes</td> </tr> <tr> <td class="onp-how-title">Locking via shortcodes</td> <td class="onp-how-yes">yes</td> <td class="onp-how-yes onp-how-premium">yes</td> </tr> <tr> <td class="onp-how-title">Batch Locks</td> <td class="onp-how-yes">yes</td> <td class="onp-how-yes onp-how-premium">yes</td> </tr> <tr> <td class="onp-how-title"><a href="#social-options">Individual settings for each button</a></td> <td class="onp-how-no">no</td> <td class="onp-how-yes onp-how-premium"><strong>yes</strong></td> </tr> <tr> <td class="onp-how-title"><a href="#extra-options">Visibility Options</a></td> <td class="onp-how-no">no</td> <td class="onp-how-yes onp-how-premium"><strong>yes</strong></td> </tr> <td class="onp-how-title"><a href="#extra-options">Advanced Options</a></td> <td class="onp-how-no">no</td> <td class="onp-how-yes onp-how-premium"><strong>yes</strong></td> </tr> <tr> <td class="onp-how-group-title"><i class="fa fa-bullhorn"></i> Social Buttons</td> <td class="onp-how-yes"></td> <td class="onp-how-yes onp-how-premium"></td </tr> <tr> <td class="onp-how-title">Facebook Like</td> <td class="onp-how-yes">yes</td> <td class="onp-how-yes onp-how-premium">yes</td> </tr> <tr> <td class="onp-how-title">Twitter Tweet</td> <td class="onp-how-yes">yes</td> <td class="onp-how-yes onp-how-premium">yes</td> </tr> <tr> <td class="onp-how-title">Google +1</td> <td class="onp-how-yes">yes</td> <td class="onp-how-yes onp-how-premium">yes</td> </tr> <tr> <td class="onp-how-title">Facebook Share</a></td> <td class="onp-how-no">no</td> <td class="onp-how-yes onp-how-premium"><strong>yes</strong></td> </tr> <tr> <td class="onp-how-title">Twitter Follow</td> <td class="onp-how-no">no</td> <td class="onp-how-yes onp-how-premium"><strong>yes</strong></td> </tr> <tr> <td class="onp-how-title">LinkedIn Share</td> <td class="onp-how-no">no</td> <td class="onp-how-yes onp-how-premium"><strong>yes</strong></td> </tr> <tr> <td class="onp-how-title">Google Share</td> <td class="onp-how-no">no</td> <td class="onp-how-yes onp-how-premium"><strong>yes</strong></td> </tr> <tr> <td class="onp-how-group-title"><i class="fa fa-adjust"></i> Overlap Modes</td> <td class="onp-how-yes"></td> <td class="onp-how-yes onp-how-premium"></td> </tr> <tr> <td class="onp-how-title">Full</td> <td class="onp-how-yes">yes</td> <td class="onp-how-yes onp-how-premium">yes</td> </tr> <tr> <td class="onp-how-title">Transparency</td> <td class="onp-how-yes">yes</td> <td class="onp-how-yes onp-how-premium">yes</td> </tr> <tr> <td class="onp-how-title"><a href="#blurring">Blurring (new!)</a></td> <td class="onp-how-no">no</td> <td class="onp-how-yes onp-how-premium"><strong>yes</strong></td> </tr> <tr> <td class="onp-how-group-title"><i class="fa fa-picture-o"></i> Themes</td> <td class="onp-how-yes"></td> <td class="onp-how-yes onp-how-premium"></td </tr> <tr> <td class="onp-how-title onp-how-group-in-group">The 'Secrets' Theme</td> <td class="onp-how-yes">yes</td> <td class="onp-how-yes onp-how-premium">yes</td> </tr> <tr> <td class="onp-how-title onp-how-group-in-group"><a href="#extra-themes">The 'Flat' Theme (new!)</a></td> <td class="onp-how-no">no</td> <td class="onp-how-yes onp-how-premium"><strong>yes</strong></td> </tr> <tr> <td class="onp-how-title onp-how-group-in-group"><a href="#extra-themes">The 'Dandyish' Theme</a></td> <td class="onp-how-no">no</td> <td class="onp-how-yes onp-how-premium"><strong>yes</strong></td> </tr> <tr> <td class="onp-how-title onp-how-group-in-group"><a href="#extra-themes">The 'Glass' Theme</a></td> <td class="onp-how-no">no</td> <td class="onp-how-yes onp-how-premium"><strong>yes</strong></td> </tr> <tr> <td class="onp-how-group-title"><i class="fa fa-clock-o"></i> Services</td> <td class="onp-how-yes"></td> <td class="onp-how-yes onp-how-premium"></td </tr> <tr> <td class="onp-how-title onp-how-group-in-group"><a href="#updates">Updates</a></td> <td class="onp-how-no">not guaranteed</td> <td class="onp-how-yes onp-how-premium"><strong>primary updates</strong></td> </tr> <tr> <td class="onp-how-title"><a href="#support">Support</a></td> <td class="onp-how-no">not guaranteed</td> <td class="onp-how-yes onp-how-premium"><strong>dedicated support</strong></td> </tr> </tbody> </table> <?php if (!$alreadyActivated) { ?> <div> <a class="button button-primary" id="activate-trial-btn" href="<?php echo onp_licensing_325_manager_link($this->plugin->pluginName, 'activateTrial', false); ?> "> <i class="fa fa-star-o"></i> Click Here To Activate Your Free Trial For 7 Days <i class="fa fa-star-o"></i> <br /> <small>(instant activation by a click)</small> </a> </div> <?php } else { ?> <div class='factory-bootstrap-329'> <a class="btn btn-gold" id="onp-sl-purchase-btn" href="<?php echo onp_licensing_325_get_purchase_url($this->plugin); ?> "> <i class="fa fa-star"></i> Purchase Opt-In Panda Premium For $24 <i class="fa fa-star"></i> </a> </div> <?php } ?> </div> <?php if (!$alreadyActivated) { ?> <div class="onp-help-section"> <p style="text-align: center;"> <a href="<?php echo onp_licensing_325_get_purchase_url($this->plugin); ?> "><strong>Or Buy The Opt-In Panda Right Now For $24</strong></a> </p> <div class="onp-remark"> <div class="onp-inner-wrap"> <p><?php _e('You can purchase the premium version at any time within your trial period or right now. After purchasing you will get a license key to unlock all the plugin features.', 'bizpanda'); ?> </p> <p><?php printf(__('<strong>To purchase the Opt-In Panda</strong>, <a target="_blank" href="%s">click here</a> to visit the plugin page on CodeCanyon. Then click the "Purchase" button on the right sidebar.', 'bizpanda'), onp_licensing_325_get_purchase_url($this->plugin)); ?> </p> </div> </div> </div> <?php } ?> <div class="onp-help-section"> <p>Upgrade To Premium and get all the following features:</p> </div> <div class="onp-help-section" id="social-options"> <h1> <i class="fa fa-star-o"></i> <?php _e('Drive More Traffic & Build Quality Followers', 'bizpanda'); ?> </h1> <p><?php _e('The premium version of the plugin provides 7 social buttons for all major social networks: Facebook, Twitter, Google, LinkedIn, including the Twitter Follow button. You can use them together or separately for customized results.', 'bizpanda'); ?> </p> <p class='onp-img'> <img src='http://cconp.s3.amazonaws.com/bizpanda/social-options.png' /> </p> <p><?php _e('What\'s more, each button has individual settings (this way you can set an individual URL for each button).'); ?> <p><?php _e('<strong>For example</strong>, you can set up the locker to get followers your Twitter account, fans for your Facebook page, +1s for a home page of your website.', 'bizpanda'); ?> </p> </div> <div class="onp-help-section" id="extra-options"> <h1> <i class="fa fa-star-o"></i> <?php _e('Set How, When and For Whom Your Lockers Appear', 'bizpanda'); ?> </h1> <p>Of course, each website has its own unique audience. We know that a good business is an agile business. The premium version of Opt-In Panda provides 8 additional options that allow you to configure the lockers flexibly to meet your needs.</p> <p class='onp-img'> <img src='http://cconp.s3.amazonaws.com/bizpanda/advanced-options.png' /> </p> <div class="clearfix"></div> </div> <div class="onp-help-section" id='blurring'> <h1> <i class="fa fa-star-o"></i> <?php _e('Create Highly Shareable Content Via The Blur Effect', 'bizpanda'); ?> </h1> <p>The previous versions of the plugin allowed only to hide the locked content totally. But recently we have added the long-awaited option to overlap content and make it transparent or blurred.</p> <p class='onp-img'> <img src='http://cconp.s3.amazonaws.com/bizpanda/blur-effect.png' /> </p> <p>When we tested this feature on sites of some our customers, we were blown away how this feature attracts attention of the huge number of visitors. If people see and understand that they will get after unlocking, the plugin works more effectively.</p> </div> <div class="onp-help-section" id='extra-themes'> <h1> <i class="fa fa-star-o"></i> <?php _e('3 Extra Stunning Themes For Your Lockers', 'bizpanda'); ?> </h1> <p> <p>The premium version of Opt-In Panda comes with 3 extra impressive, polished styles which create interest and attract attention. They are nicely animated and don't look obtrusive:</p> <ul> <li><strong>Dandyish</strong>. A very bright theme to attract maximum attention!</li> <li><strong>Flat (new!)</strong>. An extremely awesome theme based on the latest web technologies that will make your site a superstar. It's truly fascinating!</li> <li><strong>Glass</strong>. A theme with transparent background which looks good on any website.</li> </ul> </p> <p class='onp-img'> <img src='http://cconp.s3.amazonaws.com/bizpanda/new-themes.png' /> </p> </div> <div class="onp-help-section" id='updates'> <h1> <i class="fa fa-star-o"></i> <?php _e('Get New Features & Updates Almost Every Week', 'bizpanda'); ?> </h1> <p>We release about 3-4 updates each month, adding new features and fixing bugs. The Free version does not guarantee that you will get all the major updates. But if you upgrade to the Premium version, your copy of the plugin will be always up-to-date.</p> </div> <div class="onp-help-section" id='support'> <h1> <i class="fa fa-star-o"></i> <?php _e('Guaranteed Support Within 24h', 'bizpanda'); ?> </h1> <p> All of our plugins come with free support. We care about your plugin after purchase just as much as you do. We want to make your life easier and make you happy about choosing our plugins. </p> <p> Unfortunately we receive plenty of support requests every day and we cannot answer to all the users quickly. But for the users of the premium version (and the trial version), we guarantee to respond to every inquiry within 1 business day (typical response time is 3 hours). </p> </div> <?php if (!$alreadyActivated) { ?> <div class="onp-help-section"> <div> <a class="button button-primary" id="activate-trial-btn" href="<?php echo onp_licensing_325_manager_link($this->plugin->pluginName, 'activateTrial', false); ?> "> <i class="fa fa-star-o"></i> Click Here To Activate Your Free Trial For 7 Days <i class="fa fa-star-o"></i> <br /> <small>(instant activation by a click)</small> </a> </div> </div> <div class="onp-help-section"> <p style="text-align: center;"> <a href="<?php echo onp_licensing_325_get_purchase_url($this->plugin); ?> "><strong>Or Buy The Opt-In Panda Right Now For $24</strong></a> </p> <div class="onp-remark"> <div class="onp-inner-wrap"> <p><?php _e('You can purchase the premium version at any time within your trial period or right now. After purchasing you will get a license key to unlock all the plugin features.', 'bizpanda'); ?> </p> <p><?php printf(__('<strong>To purchase the Opt-In Panda</strong>, <a target="_blank" href="%s">click here</a> to visit the plugin page on CodeCanyon. Then click the "Purchase" button on the right sidebar.', 'bizpanda'), onp_licensing_325_get_purchase_url($this->plugin)); ?> </p> </div> </div> </div> <?php } else { ?> <div class="onp-help-section"> <div class='factory-bootstrap-329'> <a class="btn btn-gold" id="onp-sl-purchase-btn" href="<?php echo onp_licensing_325_get_purchase_url($this->plugin); ?> "> <i class="fa fa-star"></i> Purchase Opt-In Panda Premium For $24 <i class="fa fa-star"></i> </a> </div> </div> <?php } ?> <?php }