PluginProbe
TablePress – Tables in WordPress made easy / 3.3.3
TablePress – Tables in WordPress made easy v3.3.3
3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 2.4.4 All 44 releases
tablepress / libraries / freemius / templates / account / partials / activate-license-button.php

activate-license-button.php in TablePress – Tables in WordPress made easy 3.3.3, at libraries/freemius/templates/account/partials/activate-license-button.php

54 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 2.0.0
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 /**
14 * @var array $VARS
15 * @var Freemius $fs
16 * @var FS_Plugin_License $available_license
17 * @var string $slug
18 */
19 $fs = $VARS['freemius'];
20 $available_license = $VARS['license'];
21 $premium_plan = $VARS['plan'];
22 $slug = $VARS['slug'];
23
24 $blog_id = ! empty( $VARS['blog_id'] ) && is_numeric( $VARS['blog_id'] ) ?
25 $VARS['blog_id'] :
26 '';
27 $install_id = ! empty( $VARS['install_id'] ) && FS_Site::is_valid_id( $VARS['install_id'] ) ?
28 $VARS['install_id'] :
29 '';
30
31 $activate_plan_text = fs_text_inline( 'Activate %s Plan', 'activate-x-plan', $slug );
32
33 $action = 'activate_license';
34 ?>
35 <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
36 <input type="hidden" name="fs_action" value="<?php echo $action ?>">
37 <?php wp_nonce_field( trim("{$action}:{$blog_id}:{$install_id}", ':') ) ?>
38 <input type="hidden" name="install_id" value="<?php echo $install_id ?>">
39 <input type="hidden" name="blog_id" value="<?php echo $blog_id ?>">
40 <input type="hidden" name="license_id" value="<?php echo $available_license->id ?>">
41 <input type="submit" class="fs-activate-license button<?php echo ! empty( $VARS['class'] ) ? ' ' . $VARS['class'] : '' ?>"
42 value="<?php echo esc_attr( sprintf(
43 $activate_plan_text . '%s',
44 $premium_plan->title,
45 ( $VARS['is_localhost'] && $available_license->is_free_localhost ) ?
46 ' [' . fs_text_inline( 'Localhost', 'localhost', $slug ) . ']' :
47 ( $available_license->is_single_site() ?
48 '' :
49 ' [' . ( 1 < $available_license->left() ?
50 sprintf( fs_text_x_inline( '%s left', 'as 5 licenses left', 'x-left', $slug ), $available_license->left() ) :
51 strtolower( fs_text_inline( 'Last license', 'last-license', $slug ) ) ) . ']'
52 )
53 ) ) ?> ">
54 </form>