PluginProbe
Patchstack – WordPress & Plugins Security / 2.1.21
Patchstack – WordPress & Plugins Security v2.1.21
2.3.7 trunk 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.16 2.1.17 2.1.18 2.1.19 2.1.2 2.1.20 2.1.21 2.1.22 2.1.23 2.1.24 2.1.25 2.1.3 2.1.4 2.1.5 2.1.6 All 49 releases
patchstack / includes / views / pages / license.php

license.php in Patchstack – WordPress & Plugins Security 2.1.21, at includes/views/pages/license.php

132 lines 5.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Do not allow the file to be called directly.
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7
8 // Determine if the subscription of the account is expired.
9 $status = $this->plugin->client_id != 'PATCHSTACK_CLIENT_ID' || get_option( 'patchstack_clientid', false ) != false;
10 $free = get_option( 'patchstack_license_free', 0 ) == 1;
11 if ( isset( $_GET['activated'] ) && $status ) {
12 echo "<script>window.location = 'admin.php?page=patchstack&tab=license&active=1';</script>";
13 }
14
15 // Generate the link to turn on settings management.
16 $url = '?page=' . esc_attr( $page ) . '&tab=license&action=enable_settings&patchstack_settings_nonce=' . wp_create_nonce( 'patchstack_settings_nonce' );
17 ?>
18 <div class="patchstack-free" style="<?php echo $show_settings ? 'display: none;' : ''; ?>">
19 <div>
20 <div class="patchstack-plan patchstack-plan2">
21 <p>Visit the Patchstack app to monitor and manage your sites</p>
22
23 <div class="form-table patchstack-form-table">
24 <label for="patchstack_api_client_id">Site ID</label>
25 <input class="regular-text" type="text" id="patchstack_api_client_id" value="<?php echo esc_attr( get_option( 'patchstack_clientid', false ) ); ?>" placeholder="Enter Site ID">
26
27 <label for="patchstack_api_client_secret_key">Site Secret Key</label>
28 <input class="regular-text" type="text" id="patchstack_api_client_secret_key" value="<?php echo esc_attr( get_option( 'patchstack_secretkey', false ) ); ?>" placeholder="Enter Site Secret Key">
29 </div>
30
31 <div class="patchstack-sub">
32 <span>Subscription Type</span>
33 <span style="color: #fff;" class="patchstack-sub-type">
34 Professional
35 </span>
36 </div>
37
38 <div class="patchstack-sub" style="width: 30%;">
39 <span>Status</span>
40 <span style="color: <?php echo $status ? '#B2D675' : '#ED645E'; ?>" class="patchstack-license-status">
41 <?php echo $status ? 'Active' : 'Inactive'; ?>
42 </span>
43 </div>
44
45 <div class="patchstack-license-button">
46 <input type="submit" id="patchstack-activate" value="<?php echo $status ? __( 'Save', 'patchstack' ) : __( 'Activate', 'patchstack' ); ?>" class="button-primary <?php echo ! $status ? 'patchstack-fullwidth' : ''; ?>" />
47 <a href="https://app.patchstack.com/dashboard" class="patchstack-activate button-primary" style="<?php echo ! $status ? 'display: none;' : ''; ?>" target="_blank"><?php echo __( 'Go to App', 'patchstack' ); ?></a>
48 </div>
49 </div>
50 <div style="clear: both;"></div>
51 </div>
52
53 <p class="patchstack-upsell">
54 Click <a href="<?php echo esc_url( $url ); ?>">here</a> to manage the Patchstack settings through WordPress.
55 </p>
56 </div>
57
58 <div style="<?php echo ! $show_settings ? 'display: none;' : ''; ?>">
59 <div class="patchstack-font"
60 <?php
61 if ( $show_settings ) {
62 echo ' style="display: none;"'; }
63 ?>
64 >
65 <br />
66 <h2>Thank you for using Patchstack<?php echo ( $free ? '' : ' Professional' ); ?></h2>
67 <br />
68 <p>
69 The default settings of Patchstack are tweaked to provide a good baseline of security.<br />
70 If however you still want to tweak the settings of Patchstack, you can do so through the "Hardening" tab at <a href="https://app.patchstack.com/sites" target="_blank">app.patchstack.com</a> after logging in and clicking on your site.<br /><br />
71 Alternatively, you can turn on the setting management feature on WordPress itself by clicking <a href="">here</a>.
72 </p>
73 <br />
74 </div>
75
76 <h2 class="patchstack-license-h2 patchstack-hover"><?php echo __( 'Settings', 'patchstack' ); ?></h2>
77 <div class="patchstack-font patchstack-license-info">
78 <div id="hiddenstatusbox" class="patchstackInfo patchstack-font blue">
79 <span class="label label-success" id="patchstack_license_key_result"></span>
80 </div>
81 <p<?php echo ( $show_settings ? '' : ' style="display: none;"' ); ?>>
82 You can enter your site ID and secret key values below.<br />
83 You generally do not have to touch these values.<br /><br />
84
85 If both are empty and you do not know your site ID and secret key, you can find it by following these steps:<br />
86 1. Go to your site on the Patchstack App.<br />
87 2. Click on the "Site Settings" button on the right.<br />
88 3. Click on "Site Credentials & Download Plugin".<br />
89 4. The site ID and secret key will be displayed on this page.
90 </p>
91 <table class="form-table patchstack-form-table">
92 <tr>
93 <th>
94 <label for="patchstack_api_client_id"><?php echo __( 'Site ID', 'patchstack' ); ?></label>
95 </th>
96 <td>
97 <input class="regular-text" type="text" id="patchstack_api_client_id" value="<?php echo esc_attr( get_option( 'patchstack_clientid', false ) ); ?>" placeholder="Enter your site ID here...">
98 </td>
99 </tr>
100 <tr>
101 <th><label for="patchstack_api_client_secret_key"><?php echo __( 'Site Secret Key', 'patchstack' ); ?></label></th>
102 <td>
103 <input class="regular-text" type="text" id="patchstack_api_client_secret_key" value="<?php echo esc_attr( get_option( 'patchstack_secretkey', false ) ); ?>" placeholder="Enter your site secret key here...">
104 </td>
105 </tr>
106 <tr>
107 <th>
108 <label><?php echo __( 'Status', 'patchstack' ); ?></label>
109 </th>
110 <td>
111 <span class="patchstack-license-status" style="font-size: 13px; color: #fff;"><?php echo ( $status ? '' : 'Not ' ); ?>Activated</span>
112 </td>
113 </tr>
114 <tr>
115 <th>
116 <label><?php echo __( 'Subscription Type', 'patchstack' ); ?></label>
117 </th>
118 <td>
119 <span style="font-size: 13px; color: #fff;"><?php echo ( $free ? 'Community (Free)' : 'Professional' ); ?></span>
120 </td>
121 </tr>
122 <tr>
123 <td colspan="2">
124 <p class="submit">
125 <input type="submit" id="patchstack-activate" value="<?php echo __( 'Save', 'patchstack' ); ?>" class="button-primary" />
126 </p>
127 </td>
128 </tr>
129 </table>
130 </div>
131 </div>
132