PluginProbe ʕ •ᴥ•ʔ
Image Widget / 4.2
Image Widget v4.2
trunk 1.0 2.0 2.1 2.2 2.2.1 2.2.2 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.2 3.2.1 3.2.10 3.2.11 3.2.2 3.2.3 3.2.4 3.2.5 3.2.7 3.2.8 3.2.9 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 4.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.0.8 4.0.9 4.1 4.1.1 4.1.2 4.2 4.2.1 4.2.2 4.3 4.3.1 4.4 4.4.1 4.4.11 4.4.12 4.4.2 4.4.3 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9
image-widget / freemius / templates / pricing.php
image-widget / freemius / templates Last commit date
plugin-info 10 years ago account.php 10 years ago add-ons.php 10 years ago admin-notice.php 10 years ago all-admin-notice.php 10 years ago checkout.php 10 years ago connect.php 10 years ago contact.php 10 years ago deactivation-feedback-modal.php 10 years ago debug.php 10 years ago email.php 10 years ago firewall-issues-js.php 10 years ago pending-activation.php 10 years ago plugin-icon.php 10 years ago powered-by.php 10 years ago pricing.php 10 years ago sticky-admin-notice-js.php 10 years ago
pricing.php
96 lines
1 <?php
2 /**
3 * @package Freemius
4 * @copyright Copyright (c) 2015, Freemius, Inc.
5 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
6 * @since 1.0.3
7 */
8
9 wp_enqueue_script( 'jquery' );
10 wp_enqueue_script( 'json2' );
11 fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
12 fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
13
14 $slug = $VARS['slug'];
15 $fs = freemius( $slug );
16 $timestamp = time();
17
18 $context_params = array(
19 'plugin_id' => $fs->get_id(),
20 'plugin_public_key' => $fs->get_public_key(),
21 'plugin_version' => $fs->get_plugin_version(),
22 );
23
24 // Get site context secure params.
25 if ( $fs->is_registered() ) {
26 $context_params = array_merge( $context_params, FS_Security::instance()->get_context_params(
27 $fs->get_site(),
28 $timestamp,
29 'upgrade'
30 ) );
31 }
32
33 if ( $fs->is_payments_sandbox() ) // Append plugin secure token for sandbox mode authentication.)
34 {
35 $context_params['sandbox'] = FS_Security::instance()->get_secure_token(
36 $fs->get_plugin(),
37 $timestamp,
38 'checkout'
39 );
40 }
41
42 $query_params = array_merge( $context_params, $_GET, array(
43 'next' => $fs->_get_admin_page_url( 'account', array( 'fs_action' => $slug . '_sync_license' ) ),
44 'plugin_version' => $fs->get_plugin_version(),
45 // Billing cycle.
46 'billing_cycle' => fs_request_get( 'billing_cycle', WP_FS__PERIOD_ANNUALLY ),
47 ) );
48 ?>
49
50 <div id="fs_pricing" class="wrap" style="margin: 0 0 -65px -20px;">
51 <div id="iframe"></div>
52 <form action="" method="POST">
53 <input type="hidden" name="user_id"/>
54 <input type="hidden" name="user_email"/>
55 <input type="hidden" name="site_id"/>
56 <input type="hidden" name="public_key"/>
57 <input type="hidden" name="secret_key"/>
58 <input type="hidden" name="action" value="account"/>
59 </form>
60
61 <script type="text/javascript">
62 (function ($, undef) {
63 $(function () {
64 var
65 // Keep track of the iframe height.
66 iframe_height = 800,
67 base_url = '<?php echo WP_FS__ADDRESS ?>',
68 // Pass the parent page URL into the Iframe in a meaningful way (this URL could be
69 // passed via query string or hard coded into the child page, it depends on your needs).
70 src = base_url + '/pricing/?<?php echo http_build_query($query_params) ?>#' + encodeURIComponent(document.location.href),
71
72 // Append the Iframe into the DOM.
73 iframe = $('<iframe " src="' + src + '" width="100%" height="' + iframe_height + 'px" scrolling="no" frameborder="0" style="background: transparent;"><\/iframe>')
74 .appendTo('#iframe');
75
76 FS.PostMessage.init(base_url);
77
78 FS.PostMessage.receive('height', function (data) {
79 var h = data.height;
80 if (!isNaN(h) && h > 0 && h != iframe_height) {
81 iframe_height = h;
82 $("#iframe iframe").height(iframe_height + 'px');
83 }
84 });
85
86 FS.PostMessage.receive('get_dimensions', function (data) {
87 FS.PostMessage.post('dimensions', {
88 height : $(document.body).height(),
89 scrollTop: $(document).scrollTop()
90 }, iframe[0]);
91 });
92 });
93 })(jQuery);
94 </script>
95 </div>
96 <?php fs_require_template( 'powered-by.php' ) ?>