account
4 years ago
debug
4 years ago
forms
4 years ago
js
4 years ago
partials
4 years ago
plugin-info
4 years ago
account.php
4 years ago
add-ons.php
4 years ago
add-trial-to-pricing.php
4 years ago
admin-notice.php
4 years ago
ajax-loader.php
4 years ago
auto-installation.php
4 years ago
checkout.php
4 years ago
connect.php
4 years ago
contact.php
4 years ago
debug.php
4 years ago
email.php
4 years ago
firewall-issues-js.php
4 years ago
gdpr-optin-js.php
4 years ago
index.php
4 years ago
plugin-icon.php
4 years ago
powered-by.php
4 years ago
pricing.php
4 years ago
secure-https-header.php
4 years ago
sticky-admin-notice-js.php
4 years ago
tabs-capture-js.php
4 years ago
tabs.php
4 years ago
add-trial-to-pricing.php
31 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Add "&trial=true" to pricing menu item href when running in trial |
| 4 | * promotion context. |
| 5 | * |
| 6 | * @package Freemius |
| 7 | * @copyright Copyright (c) 2016, Freemius, Inc. |
| 8 | * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 |
| 9 | * @since 1.2.1.5 |
| 10 | */ |
| 11 | |
| 12 | if ( ! defined( 'ABSPATH' ) ) { |
| 13 | exit; |
| 14 | } |
| 15 | |
| 16 | /** |
| 17 | * @var Freemius $fs |
| 18 | */ |
| 19 | $fs = freemius( $VARS['id'] ); |
| 20 | ?> |
| 21 | <script type="text/javascript"> |
| 22 | (function ($) { |
| 23 | $(document).ready(function () { |
| 24 | var $pricingMenu = $('.fs-submenu-item.<?php echo $fs->get_unique_affix() ?>.pricing'), |
| 25 | $pricingMenuLink = $pricingMenu.parents('a'); |
| 26 | |
| 27 | // Add trial querystring param. |
| 28 | $pricingMenuLink.attr('href', $pricingMenuLink.attr('href') + '&trial=true'); |
| 29 | }); |
| 30 | })(jQuery); |
| 31 | </script> |