PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 2.10.0
Independent Analytics – WordPress Analytics Plugin v2.10.0
2.15.5 2.15.4 2.15.3 2.15.2 2.15.1 2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 1.19.1 1.2 1.20.0 1.21.0 1.22.0 1.22.1 1.23.0 1.23.1 1.24.0 1.24.1 1.25.0 1.25.1 1.26.0 1.27.0 1.28.0 1.28.1 1.28.2 1.28.3 1.29.0 1.3 1.30.0 1.30.1 1.4 1.5 1.6 1.7 1.8 1.9 2.0.0 2.0.1 2.1.4 2.1.5 2.1.6 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.10 2.11.2 2.11.3 2.11.4 2.11.5 2.11.6 2.11.7 2.11.8 2.11.9 2.12.0 2.12.1 2.12.2 2.13.1 2.13.2 2.13.5 2.13.6 2.14.0 2.14.1 2.14.2 2.14.4 2.14.6 2.14.7 2.14.8 2.14.9 2.2.0 2.2.1 2.3.1 2.3.2 2.4.2 2.4.3 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 2.7.0 2.7.1 2.7.2 2.7.3 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7
independent-analytics / freemius / templates / pricing.php
independent-analytics / freemius / templates Last commit date
account 2 years ago checkout 1 year ago connect 3 years ago debug 3 years ago forms 1 year ago js 3 years ago partials 3 years ago plugin-info 3 years ago account.php 1 year ago add-ons.php 1 year ago add-trial-to-pricing.php 3 years ago admin-notice.php 3 years ago ajax-loader.php 3 years ago api-connectivity-message-js.php 3 years ago auto-installation.php 3 years ago checkout.php 1 year ago clone-resolution-js.php 2 years ago connect.php 1 year ago contact.php 1 year ago debug.php 1 year ago email.php 3 years ago gdpr-optin-js.php 3 years ago index.php 3 years ago plugin-icon.php 3 years ago pricing.php 1 year ago secure-https-header.php 3 years ago sticky-admin-notice-js.php 3 years ago tabs-capture-js.php 3 years ago tabs.php 3 years ago
pricing.php
114 lines
1 <?php
2 /**
3 * @package Freemius
4 * @copyright Copyright (c) 2015, Freemius, Inc.
5 * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6 * @since 1.0.3
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 wp_enqueue_script( 'jquery' );
14 wp_enqueue_script( 'json2' );
15 fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.js' );
16 fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
17 fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
18
19 /**
20 * @var array $VARS
21 * @var Freemius $fs
22 */
23 $fs = freemius( $VARS['id'] );
24 $slug = $fs->get_slug();
25 $timestamp = time();
26
27 $context_params = array(
28 'plugin_id' => $fs->get_id(),
29 'plugin_public_key' => $fs->get_public_key(),
30 'plugin_version' => $fs->get_plugin_version(),
31 );
32
33 $bundle_id = $fs->get_bundle_id();
34 if ( ! is_null( $bundle_id ) ) {
35 $context_params['bundle_id'] = $bundle_id;
36 }
37
38 // Get site context secure params.
39 if ( $fs->is_registered() ) {
40 $context_params = array_merge( $context_params, FS_Security::instance()->get_context_params(
41 $fs->get_site(),
42 $timestamp,
43 'upgrade'
44 ) );
45 } else {
46 $context_params['home_url'] = home_url();
47 }
48
49 if ( $fs->is_payments_sandbox() ) // Append plugin secure token for sandbox mode authentication.)
50 {
51 $context_params['sandbox'] = FS_Security::instance()->get_secure_token(
52 $fs->get_plugin(),
53 $timestamp,
54 'checkout'
55 );
56 }
57
58 $query_params = array_merge( $context_params, $_GET, array(
59 'next' => $fs->_get_sync_license_url( false, false ),
60 'plugin_version' => $fs->get_plugin_version(),
61 // Billing cycle.
62 'billing_cycle' => fs_request_get( 'billing_cycle', WP_FS__PERIOD_ANNUALLY ),
63 'is_network_admin' => fs_is_network_admin() ? 'true' : 'false',
64 'currency' => $fs->apply_filters( 'default_currency', 'usd' ),
65 'discounts_model' => $fs->apply_filters( 'pricing/discounts_model', 'absolute' ),
66 ) );
67
68 $pricing_js_url = fs_asset_url( $fs->get_pricing_js_path() );
69
70 wp_enqueue_script( 'freemius-pricing', $pricing_js_url );
71
72 $pricing_css_path = $fs->apply_filters( 'pricing/css_path', null );
73 if ( is_string( $pricing_css_path ) ) {
74 wp_enqueue_style( 'freemius-pricing', fs_asset_url( $pricing_css_path ) );
75 }
76
77 $has_tabs = $fs->_add_tabs_before_content();
78
79 if ( $has_tabs ) {
80 $query_params['tabs'] = 'true';
81 }
82 ?>
83 <div id="fs_pricing" class="wrap fs-section fs-full-size-wrapper">
84 <div id="fs_pricing_wrapper" data-public-url="<?php echo trailingslashit( dirname( $pricing_js_url ) ) ?>"></div>
85 <?php
86 $pricing_config = array_merge( array(
87 'contact_url' => $fs->contact_url(),
88 'is_production' => ( defined( 'WP_FS__IS_PRODUCTION_MODE' ) ? WP_FS__IS_PRODUCTION_MODE : null ),
89 'menu_slug' => $fs->get_menu_slug(),
90 'mode' => 'dashboard',
91 'fs_wp_endpoint_url' => WP_FS__ADDRESS,
92 'request_handler_url' => admin_url(
93 'admin-ajax.php?' . http_build_query( array(
94 'module_id' => $fs->get_id(),
95 'action' => $fs->get_ajax_action( 'pricing_ajax_action' ),
96 'security' => $fs->get_ajax_security( 'pricing_ajax_action' )
97 ) )
98 ),
99 'selector' => '#fs_pricing_wrapper',
100 'unique_affix' => $fs->get_unique_affix(),
101 'show_annual_in_monthly' => $fs->apply_filters( 'pricing/show_annual_in_monthly', true ),
102 'license' => $fs->has_active_valid_license() ? $fs->_get_license() : null,
103 'plugin_icon' => $fs->get_local_icon_url(),
104 'disable_single_package' => $fs->apply_filters( 'pricing/disable_single_package', false ),
105 ), $query_params );
106
107 wp_add_inline_script( 'freemius-pricing', 'Freemius.pricing.new( ' . json_encode( $pricing_config ) . ' )' );
108 ?>
109 </div>
110 <?php
111 if ( $has_tabs ) {
112 $fs->_add_tabs_after_content();
113 }
114