| 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 http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 9 |
* @since 1.2.1.5 |
| 10 |
*/ |
| 11 |
|
| 12 |
if ( ! defined( 'ABSPATH' ) ) { |
| 13 |
exit; |
| 14 |
} |
| 15 |
|
| 16 |
/** |
| 17 |
* @var array $VARS |
| 18 |
*/ |
| 19 |
$slug = $VARS['slug']; |
| 20 |
?> |
| 21 |
<script type="text/javascript"> |
| 22 |
(function ($) { |
| 23 |
$(document).ready(function () { |
| 24 |
var $pricingMenu = $('.fs-submenu-item.<?php echo $slug ?>.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> |