Controllers
4 years ago
SettingsPages
4 years ago
Views
4 years ago
HelpContactUs.php
4 years ago
PremiumFeatures.php
4 years ago
SettingsPage.php
4 years ago
SetupWizard.php
4 years ago
User.php
4 years ago
UserListing.php
4 years ago
UserNotices.php
4 years ago
UserProfile.php
4 years ago
UserRegistered.php
4 years ago
index.php
5 years ago
PremiumFeatures.php
357 lines
| 1 | <?php // phpcs:ignore |
| 2 | |
| 3 | namespace WP2FA\Admin; |
| 4 | |
| 5 | use \WP2FA\WP2FA as WP2FA; |
| 6 | |
| 7 | /** |
| 8 | * PremiumFeatures - Handles contact the features page and content. |
| 9 | */ |
| 10 | class PremiumFeatures { |
| 11 | |
| 12 | const TOP_MENU_SLUG = 'wp-2fa-premium-features'; |
| 13 | |
| 14 | /** |
| 15 | * Create admin menu entry and settings page |
| 16 | */ |
| 17 | public function add_extra_menu_item() { |
| 18 | add_submenu_page( |
| 19 | 'wp-2fa-policies', |
| 20 | esc_html__( 'Premium Features', 'wp-2fa' ), |
| 21 | esc_html__( 'Premium Features ➤', 'wp-2fa' ), |
| 22 | 'manage_options', |
| 23 | self::TOP_MENU_SLUG, |
| 24 | array( $this, 'render' ), |
| 25 | 100 |
| 26 | ); |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Handles rendering the content. |
| 31 | * |
| 32 | * @return void |
| 33 | */ |
| 34 | public function render() { |
| 35 | ?> |
| 36 | <style> |
| 37 | .features-wrap { |
| 38 | background: #fff; |
| 39 | padding: 25px 30px; |
| 40 | margin-top: 25px; |
| 41 | } |
| 42 | |
| 43 | .features-wrap h2 { |
| 44 | font-size: 28px; |
| 45 | margin-bottom: 30px; |
| 46 | } |
| 47 | |
| 48 | .features-wrap p { |
| 49 | font-size: 16px; |
| 50 | line-height: 28px; |
| 51 | } |
| 52 | |
| 53 | .feature-list { |
| 54 | margin-bottom: 20px; |
| 55 | } |
| 56 | |
| 57 | .feature-list li { |
| 58 | margin-bottom: 10px; |
| 59 | font-size: 15px; |
| 60 | } |
| 61 | |
| 62 | .feature-list li .dashicons { |
| 63 | color: #3E6BFF; |
| 64 | } |
| 65 | |
| 66 | .premium-cta { |
| 67 | margin: 25px 0 15px; |
| 68 | text-align: center; |
| 69 | } |
| 70 | |
| 71 | .premium-cta a, .table-link { |
| 72 | background-color: #3E6BFF; |
| 73 | color: #fff; |
| 74 | padding: 15px 26px; |
| 75 | border-radius: 30px; |
| 76 | font-size: 16px; |
| 77 | white-space: nowrap; |
| 78 | text-decoration: none; |
| 79 | font-weight: 700; |
| 80 | display: inline-block; |
| 81 | margin-right: 15px; |
| 82 | border: 2px solid #3E6BFF; |
| 83 | } |
| 84 | |
| 85 | .premium-cta a:hover, .table-link:hover, .premium-cta a.inverse, .table-link.inverse { |
| 86 | color: #3E6BFF; |
| 87 | background-color: #fff; |
| 88 | } |
| 89 | |
| 90 | .content-block { |
| 91 | margin-bottom: 26px; |
| 92 | border-bottom: 1px solid #eee; |
| 93 | padding-bottom: 15px; |
| 94 | } |
| 95 | |
| 96 | .feature-table tr td { |
| 97 | text-align: center; |
| 98 | min-width: 200px |
| 99 | } |
| 100 | .feature-table tr td:first-of-type { |
| 101 | text-align: left; |
| 102 | font-weight: 500; |
| 103 | } |
| 104 | .feature-table td p { |
| 105 | margin-top: 0; |
| 106 | } |
| 107 | .row-head span { |
| 108 | font-size: 17px; |
| 109 | font-weight: 700; |
| 110 | } |
| 111 | .feature-table .dashicons { |
| 112 | color: #3E6BFF; |
| 113 | } |
| 114 | .feature-table .dashicons-no { |
| 115 | color: red; |
| 116 | } |
| 117 | .table-link { |
| 118 | font-size: 14px; |
| 119 | padding: 9px; |
| 120 | width: 193px; |
| 121 | margin-top: 10px; |
| 122 | } |
| 123 | .pull-up { |
| 124 | position: relative; |
| 125 | top: -23px; |
| 126 | } |
| 127 | |
| 128 | .wp2fa-logo { |
| 129 | max-width: 130px; |
| 130 | } |
| 131 | |
| 132 | .logo-wrap { |
| 133 | float: left; |
| 134 | margin-right: 30px; |
| 135 | } |
| 136 | </style> |
| 137 | |
| 138 | <div class="wrap help-wrap features-wrap wp-2fa-settings-wrapper"> |
| 139 | <div class="page-head"> |
| 140 | <h2><?php esc_html_e( 'Upgrade to Premium to benefit more!', 'wp-2fa' ); ?></h2> |
| 141 | </div> |
| 142 | <div class="content-block"> |
| 143 | <div class="logo-wrap"> |
| 144 | <img class="wp2fa-logo" src="<?php echo WP_2FA_URL; ?>dist/images/wp-2fa-color_opt.png" alt=""> |
| 145 | </div> |
| 146 | <div> |
| 147 | <p><?php esc_html_e( 'WP 2FA is your trusted gatekeeper, keeping your website, users, customers, team members, and you secure and better protected than ever before. We thank you for the continued trust you show in our plugin.', 'wp-2fa' ); ?></p> |
| 148 | <p><?php esc_html_e( 'Upgrade to WP 2FA Premium to automate more, encouraging users to utilize 2FA to its fullest extent and give your users more flexibility by allowing them to work from pretty much anywhere without compromising on security.', 'wp-2fa' ); ?></p> |
| 149 | </div> |
| 150 | </div> |
| 151 | <div class="content-block"> |
| 152 | <p><?php esc_html_e( 'Upgrade to Premium today to start benefiting from value-added features such as:', 'wp-2fa' ); ?></p> |
| 153 | <ul class="feature-list"> |
| 154 | <li><span class="dashicons dashicons-saved"></span> <?php esc_html_e( 'Trusted devices: Give users the option to add trusted devices so they do not have to enter the 2FA code each time they log in', 'wp-2fa' ); ?></li> |
| 155 | <li><span class="dashicons dashicons-saved"></span> <?php esc_html_e( 'White labeling tools & features: Gain increased trust by extending your business\' branding and tone of voice to all 2FA pages', 'wp-2fa' ); ?></li> |
| 156 | <li><span class="dashicons dashicons-saved"></span> <?php esc_html_e( 'Configure different policies for different user roles: While requiring everyone to use 2FA is generally a good idea, stricter policies for more sensitive accounts can help you keep everyone happy', 'wp-2fa' ); ?></li> |
| 157 | </ul> |
| 158 | <div class="premium-cta"> |
| 159 | <a href="<?php echo esc_url( 'https://wp2fa.io/pricing/?utm_source=plugin&utm_medium=referral&utm_campaign=WP2FA' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'UPGRADE NOW', 'wp-2fa' ); ?></a> |
| 160 | <a class="inverse" href="<?php echo esc_url( 'https://wp2fa.io/get-wp-2fa-premium-trial/?utm_source=plugin&utm_medium=referral&utm_campaign=WP2FA' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Get the Free 14-day trial', 'wp-2fa' ); ?></a> |
| 161 | </div> |
| 162 | </div> |
| 163 | |
| 164 | <div class="content-block"> |
| 165 | <p><?php esc_html_e( 'Take advantage of these benefits and many others, with prices starting from as little as $59 for 5 users per year. Below is the complete list of Premium features:', 'wp-2fa' ); ?></p> |
| 166 | <table class="c21 feature-table"> |
| 167 | <tbody> |
| 168 | <tr class="c2"> |
| 169 | <td class="c6" colspan="1" rowspan="1"> |
| 170 | <p class="c10 c4"><span class="c5"></span></p> |
| 171 | </td> |
| 172 | <td class="c8 row-head" colspan="1" rowspan="1"> |
| 173 | <p class="c7"><span class="c5"><?php esc_html_e( 'Premium', 'wp-2fa' ); ?></span></p> |
| 174 | </td> |
| 175 | <td class="c12 row-head" colspan="1" rowspan="1"> |
| 176 | <p class="c7"><span class="c5"><?php esc_html_e( 'Free', 'wp-2fa' ); ?></span></p> |
| 177 | </td> |
| 178 | </tr> |
| 179 | <tr class="c2"> |
| 180 | <td class="c6" colspan="1" rowspan="1"> |
| 181 | <p class="c10"><span class="c5"><?php esc_html_e( 'Support', 'wp-2fa' ); ?></span></p> |
| 182 | </td> |
| 183 | <td class="c8" colspan="1" rowspan="1"> |
| 184 | <p class="c7"><span class="c5"><?php esc_html_e( 'Email & forums', 'wp-2fa' ); ?></span></p> |
| 185 | </td> |
| 186 | <td class="c12" colspan="1" rowspan="1"> |
| 187 | <p class="c7"><span class="c5"><?php esc_html_e( 'Forums', 'wp-2fa' ); ?></span></p> |
| 188 | </td> |
| 189 | </tr> |
| 190 | <tr class="c2"> |
| 191 | <td class="c6" colspan="1" rowspan="1"> |
| 192 | <p class="c10"><span class="c5"><?php esc_html_e( 'Install on unlimited websites', 'wp-2fa' ); ?></span></p> |
| 193 | </td> |
| 194 | <td class="c8" colspan="1" rowspan="1"> |
| 195 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 196 | </td> |
| 197 | <td class="c12" colspan="1" rowspan="1"> |
| 198 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 199 | </td> |
| 200 | </tr> |
| 201 | <tr class="c2"> |
| 202 | <td class="c6" colspan="1" rowspan="1"> |
| 203 | <p class="c10"><span class="c5"><?php esc_html_e( 'E-commerce, membership & other third party plugins support', 'wp-2fa' ); ?></span></p> |
| 204 | </td> |
| 205 | <td class="c8" colspan="1" rowspan="1"> |
| 206 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 207 | </td> |
| 208 | <td class="c12" colspan="1" rowspan="1"> |
| 209 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 210 | </td> |
| 211 | </tr> |
| 212 | <tr class="c2"> |
| 213 | <td class="c6" colspan="1" rowspan="1"> |
| 214 | <p class="c10"><span class="c5"><?php esc_html_e( '2FA code via mobile app', 'wp-2fa' ); ?></span></p> |
| 215 | </td> |
| 216 | <td class="c8" colspan="1" rowspan="1"> |
| 217 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 218 | </td> |
| 219 | <td class="c12" colspan="1" rowspan="1"> |
| 220 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 221 | </td> |
| 222 | </tr> |
| 223 | <tr class="c2"> |
| 224 | <td class="c6" colspan="1" rowspan="1"> |
| 225 | <p class="c10"><span class="c5"><?php esc_html_e( '2FA code over email', 'wp-2fa' ); ?></span></p> |
| 226 | </td> |
| 227 | <td class="c8" colspan="1" rowspan="1"> |
| 228 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 229 | </td> |
| 230 | <td class="c12" colspan="1" rowspan="1"> |
| 231 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 232 | </td> |
| 233 | </tr> |
| 234 | <tr class="c2"> |
| 235 | <td class="c6" colspan="1" rowspan="1"> |
| 236 | <p class="c10"><span class="c5"><?php esc_html_e( 'Backup codes', 'wp-2fa' ); ?></span></p> |
| 237 | </td> |
| 238 | <td class="c8" colspan="1" rowspan="1"> |
| 239 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 240 | </td> |
| 241 | <td class="c12" colspan="1" rowspan="1"> |
| 242 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 243 | </td> |
| 244 | </tr> |
| 245 | <tr class="c2"> |
| 246 | <td class="c6" colspan="1" rowspan="1"> |
| 247 | <p class="c10"><span class="c5"><?php esc_html_e( 'One-click 2FA login', 'wp-2fa' ); ?></span></p> |
| 248 | </td> |
| 249 | <td class="c8" colspan="1" rowspan="1"> |
| 250 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 251 | </td> |
| 252 | <td class="c12" colspan="1" rowspan="1"> |
| 253 | <p class="c7"><span class="c5"><span class="dashicons dashicons-no"></span></span></p> |
| 254 | </td> |
| 255 | </tr> |
| 256 | <tr class="c2"> |
| 257 | <td class="c6" colspan="1" rowspan="1"> |
| 258 | <p class="c10"><span class="c5"><?php esc_html_e( 'Different 2FA policies per user role', 'wp-2fa' ); ?></span></p> |
| 259 | </td> |
| 260 | <td class="c8" colspan="1" rowspan="1"> |
| 261 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 262 | </td> |
| 263 | <td class="c12" colspan="1" rowspan="1"> |
| 264 | <p class="c7"><span class="c5"><span class="dashicons dashicons-no"></span></span></p> |
| 265 | </td> |
| 266 | </tr> |
| 267 | <tr class="c2"> |
| 268 | <td class="c6" colspan="1" rowspan="1"> |
| 269 | <p class="c10"><span class="c5"><?php esc_html_e( 'Trusted devices (don\'t ask for 2FA code)', 'wp-2fa' ); ?></span></p> |
| 270 | </td> |
| 271 | <td class="c8" colspan="1" rowspan="1"> |
| 272 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 273 | </td> |
| 274 | <td class="c12" colspan="1" rowspan="1"> |
| 275 | <p class="c7"><span class="c5"><span class="dashicons dashicons-no"></span></span></p> |
| 276 | </td> |
| 277 | </tr> |
| 278 | <tr class="c2"> |
| 279 | <td class="c6" colspan="1" rowspan="1"> |
| 280 | <p class="c10"><span class="c5"><?php esc_html_e( 'Secondary 2FA backup method', 'wp-2fa' ); ?></span></p> |
| 281 | </td> |
| 282 | <td class="c8" colspan="1" rowspan="1"> |
| 283 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 284 | </td> |
| 285 | <td class="c12" colspan="1" rowspan="1"> |
| 286 | <p class="c7"><span class="c5"><span class="dashicons dashicons-no"></span></span></p> |
| 287 | </td> |
| 288 | </tr> |
| 289 | <tr class="c2"> |
| 290 | <td class="c6" colspan="1" rowspan="1"> |
| 291 | <p class="c10"><span class="c5"><?php esc_html_e( 'White labeling (logo, text, colors & fonts)', 'wp-2fa' ); ?></span></p> |
| 292 | </td> |
| 293 | <td class="c8" colspan="1" rowspan="1"> |
| 294 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 295 | </td> |
| 296 | <td class="c12" colspan="1" rowspan="1"> |
| 297 | <p class="c7"><span class="c5"><span class="dashicons dashicons-no"></span></span></p> |
| 298 | </td> |
| 299 | </tr> |
| 300 | <tr class="c2"> |
| 301 | <td class="c6" colspan="1" rowspan="1"> |
| 302 | <p class="c10"><span class="c5"><?php esc_html_e( 'Reports & Statistics', 'wp-2fa' ); ?></span></p> |
| 303 | </td> |
| 304 | <td class="c8" colspan="1" rowspan="1"> |
| 305 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 306 | </td> |
| 307 | <td class="c12" colspan="1" rowspan="1"> |
| 308 | <p class="c7"><span class="c5"><span class="dashicons dashicons-no"></span></span></p> |
| 309 | </td> |
| 310 | </tr> |
| 311 | <tr class="c2"> |
| 312 | <td class="c6" colspan="1" rowspan="1"> |
| 313 | <p class="c10"><span class="c5"><?php esc_html_e( 'Configurable 2FA code expiration time', 'wp-2fa' ); ?></span></p> |
| 314 | </td> |
| 315 | <td class="c8" colspan="1" rowspan="1"> |
| 316 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 317 | </td> |
| 318 | <td class="c12" colspan="1" rowspan="1"> |
| 319 | <p class="c7"><span class="c5"><span class="dashicons dashicons-no"></span></span></p> |
| 320 | </td> |
| 321 | </tr> |
| 322 | <tr class="c2"> |
| 323 | <td class="c6" colspan="1" rowspan="1"> |
| 324 | <p class="c10"><span class="c5"><?php esc_html_e( 'Sortable users\' 2FA status', 'wp-2fa' ); ?></span></p> |
| 325 | </td> |
| 326 | <td class="c8" colspan="1" rowspan="1"> |
| 327 | <p class="c7"><span class="c5"><span class="dashicons dashicons-saved"></span></span></p> |
| 328 | </td> |
| 329 | <td class="c12" colspan="1" rowspan="1"> |
| 330 | <p class="c7"><span class="c5"><span class="dashicons dashicons-no"></span></span></p> |
| 331 | </td> |
| 332 | </tr> |
| 333 | </tbody> |
| 334 | </table> |
| 335 | |
| 336 | <div class="premium-cta"> |
| 337 | <a href="<?php echo esc_url( 'https://wp2fa.io/pricing/?utm_source=plugin&utm_medium=referral&utm_campaign=WP2FA' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'UPGRADE NOW', 'wp-2fa' ); ?></a> |
| 338 | <a class="inverse" href="<?php echo esc_url( 'https://wp2fa.io/get-wp-2fa-premium-trial/?utm_source=plugin&utm_medium=referral&utm_campaign=WP2FA' ); ?>" target="_blank" rel="noopener"><?php esc_html_e( 'Get the Free 14-day trial', 'wp-2fa' ); ?></a> |
| 339 | </div> |
| 340 | </div> |
| 341 | |
| 342 | <div> |
| 343 | <p><?php |
| 344 | $text = sprintf( |
| 345 | esc_html__( 'For more information about the WP 2FA, please %1$s. If you have any questions about the plugin or would like to ask us anything, please %2$s', 'wp-2fa' ), |
| 346 | '<a target="_blank" href="'. esc_url( 'https://wp2fa.io' ) . '">' . esc_html__( 'visit our website', 'wp-2fa' ) . '</a>', |
| 347 | '<a target="_blank" href="'. esc_url( 'https://wp2fa.io/contact/') . '">' . esc_html__( 'our contact form', 'wp-2fa' ) . '</a>.' |
| 348 | ); |
| 349 | |
| 350 | echo $text; |
| 351 | ?></p> |
| 352 | </div> |
| 353 | </div> |
| 354 | <?php |
| 355 | } |
| 356 | } |
| 357 |