PluginProbe
Password Protected — Lock Entire Site, Pages, Posts, Categories, and Partial Content / 2.7.9
Password Protected — Lock Entire Site, Pages, Posts, Categories, and Partial Content v2.7.9
2.8.4 2.8.3 2.8.2 2.8.1 trunk 1.0 1.1 1.2 1.2.1 1.2.2 1.3 1.4 1.5 1.6 1.6.1 1.6.2 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.0.1 2.0.2 2.0.3 All 63 releases
password-protected / admin / admin.php

admin.php in Password Protected — Lock Entire Site, Pages, Posts, Categories, and Partial Content 2.7.9, at admin/admin.php

2,082 lines 151.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class Password_Protected_Admin {
4
5 var $settings_page_id;
6 var $options_group = 'password-protected';
7 var $setting_tabs = array();
8
9 /**
10 * Constructor
11 */
12 public function __construct() {
13 global $wp_version;
14 add_action( 'admin_init', array( $this, 'password_protected_register_setting_tabs' ) );
15 add_action( 'admin_init', array( $this, 'password_protected_settings' ), 15 );
16 add_action( 'admin_init', array( $this, 'add_privacy_policy' ) );
17 add_action( 'admin_menu', array( $this, 'admin_menu' ) );
18 add_action( 'password_protected_subtab_password-protected-page-description_content', array( $this, 'password_protected_page_description_tab' ) );
19 add_action( 'password_protected_help_tabs', array( $this, 'help_tabs' ), 5 );
20 add_action( 'admin_notices', array( $this, 'password_protected_admin_notices' ) );
21 add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 4 );
22 add_filter( 'plugin_action_links_password-protected/password-protected.php', array( $this, 'plugin_action_links' ) );
23 add_filter( 'pre_update_option_password_protected_password', array( $this, 'pre_update_option_password_protected_password' ), 10, 2 );
24 add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
25 add_action( 'init', array( $this, 'init' ) );
26
27 add_action( 'password_protected_subtab_cache-issue_content', array( $this, 'cache_related_issue' ) );
28 add_action( 'admin_footer', array( $this, 'add_script_in_footer' ), 9999 );
29 }
30
31 public function add_script_in_footer() {
32 ?>
33 <script type="text/javascript">
34 jQuery( document ).ready( function( $ ) {
35 $( '.toplevel_page_password-protected a' ).each( function( index,element ) {
36 if ( 'admin.php?page=password-protected-get-pro' === $( element ).attr( 'href' ) ) {
37 $( element ).css( { 'background-color': '#8076ff', 'color': '#ffffff', 'padding': '15px auto' } );
38 }
39 } );
40 } );
41 </script>
42 <?php
43 }
44
45 /**
46 * Password protected setting tabs
47 * customizable using filter hook
48 */
49 public function password_protected_register_setting_tabs() {
50 $this->setting_tabs = array(
51 'general' => array(
52 'title' => __( 'General', 'password-protected' ),
53 'slug' => 'general',
54 'icon' => 'dashicons-migrate',
55 ),
56
57 'advanced' => array(
58 'title' => __( 'Advanced', 'password-protected' ),
59 'slug' => 'advanced',
60 'icon' => 'dashicons-admin-settings',
61 'sub-tabs' => array(
62 'exclude-from-protection' => array(
63 'title' => __( 'Exclude From Protection', 'password-protected' ),
64 'slug' => 'exclude-from-protection',
65 ),
66
67 'password-protected-page-description' => array(
68 'title' => __( 'Protected Page Content', 'password-protected' ),
69 'slug' => 'password-protected-page-description',
70 ),
71
72 'bypass-url' => array(
73 'title' => __( 'Bypass URL', 'password-protected' ),
74 'slug' => 'bypass-url',
75 ),
76
77 'cache-issue' => array(
78 'title' => __( 'Cache Issue', 'password-protected' ),
79 'slug' => 'cache-issue',
80 ),
81 ),
82 ),
83
84 'manage_passwords' => array(
85 'title' => __( 'Multiple Passwords', 'password-protected' ),
86 'slug' => 'manage_passwords',
87 'icon' => 'dashicons-shield',
88 ),
89
90 'content-protection' => array(
91 'title' => __( 'Content Protection', 'password-protected' ),
92 'slug' => 'content-protection',
93 'icon' => 'dashicons-superhero',
94 'sub-tabs' => array(
95 'post-type-protection' => array(
96 'title' => __( 'Post Type Protection', 'password-protected' ),
97 'slug' => 'post-type-protection',
98 ),
99
100 'taxonomy-protection' => array(
101 'title' => __( 'Taxonomy Protection', 'password-protected' ),
102 'slug' => 'taxonomy-protection',
103 ),
104 ),
105 ),
106
107 'security' => array(
108 'title' => __( 'Security', 'password-protected' ),
109 'slug' => 'security',
110 'icon' => 'dashicons-shield-alt',
111 'sub-tabs' => array(
112 'whitelist-user-role' => array(
113 'title' => __( 'Whitelist User Role', 'password-protected' ),
114 'slug' => 'whitelist-user-role',
115 ),
116
117 'google-recaptcha' => array(
118 'title' => __( 'Google ReCaptcha', 'password-protected' ),
119 'slug' => 'google-recaptcha',
120 ),
121
122 'wp-admin-protection' => array(
123 'title' => __( 'WP-Admin Protection', 'password-protected' ),
124 'slug' => 'wp-admin-protection',
125 ),
126
127 'attempt-limitation' => array(
128 'title' => __( 'Attempt Limitation', 'password-protected' ),
129 'slug' => 'attempt-limitation',
130 ),
131 ),
132 ),
133
134 'logs' => array(
135 'title' => __( 'Logs', 'password-protected' ),
136 'slug' => 'logs',
137 'icon' => 'dashicons-media-text',
138 'sub-tabs' => array(
139 'activity_logs' => array(
140 'title' => __( 'Activity Logs', 'password-protected' ),
141 'slug' => 'activity_logs',
142 ),
143
144 'activity-report' => array(
145 'title' => __( 'Activity Report', 'password-protected' ),
146 'slug' => 'activity-report',
147 ),
148 ),
149 ),
150
151 'protected-screen' => array(
152 'title' => __( 'Customization', 'password-protected' ),
153 'slug' => 'protected-screen',
154 'icon' => 'dashicons-admin-customizer',
155 'sub-tabs' => array(
156 'logo-styles' => array(
157 'title' => __( 'Logo', 'password-protected' ),
158 'slug' => 'logo-styles',
159 ),
160 'label-styles' => array(
161 'title' => __( 'Labels', 'password-protected' ),
162 'slug' => 'label-styles',
163 ),
164 'field-styles' => array(
165 'title' => __( 'Fields', 'password-protected' ),
166 'slug' => 'field-styles',
167 ),
168 'button-styles' => array(
169 'title' => __( 'Button', 'password-protected' ),
170 'slug' => 'button-styles',
171 ),
172 'remember-me-styles' => array(
173 'title' => __( 'Remember Me', 'password-protected' ),
174 'slug' => 'remember-me-styles',
175 ),
176 'form-background' => array(
177 'title' => __( 'Form Background', 'password-protected' ),
178 'slug' => 'form-background',
179 ),
180 'body-background' => array(
181 'title' => __( 'Body Background', 'password-protected' ),
182 'slug' => 'body-background',
183 ),
184 'below-form' => array(
185 'title' => __( 'Form Content', 'password-protected' ),
186 'slug' => 'below-form',
187 ),
188 'below-page' => array(
189 'title' => __( 'Page Content', 'password-protected' ),
190 'slug' => 'below-page',
191 ),
192 'custom-css' => array(
193 'title' => __( 'Custom CSS', 'password-protected' ),
194 'slug' => 'custom-css',
195 ),
196 ),
197 ),
198
199 'request-password' => array(
200 'title' => __( 'Password Request', 'password-protected' ),
201 'slug' => 'request-password',
202 'icon' => 'dashicons-email-alt',
203 'sub-tabs' => array(
204 'password-request' => array(
205 'title' => __( 'Request Password', 'password-protected' ),
206 'slug' => 'password-request',
207 ),
208 'requests' => array(
209 'title' => __( 'Requests', 'password-protected' ),
210 'slug' => 'requests',
211 ),
212 'email-templates' => array(
213 'title' => __( 'Email Templates', 'password-protected' ),
214 'slug' => 'email-templates',
215 ),
216 ),
217 ),
218 );
219
220 $this->setting_tabs = apply_filters( 'password_protected_setting_tabs', $this->setting_tabs );
221
222 $this->setting_tabs['help'] = array(
223 'title' => __( 'Help', 'password-protected' ),
224 'slug' => 'help',
225 'icon' => 'dashicons-editor-help',
226 );
227 $this->setting_tabs['getpro'] = array(
228 'title' => __( 'Get Pro', 'password-protected' ),
229 'slug' => 'getpro',
230 'icon' => 'dashicons-superhero-alt',
231 );
232
233 if ( class_exists( 'Password_Protected_Pro' ) ) {
234 unset( $this->setting_tabs['getpro'] );
235 }
236 }
237
238 /**
239 * Admin enqueue scripts.
240 *
241 * @param string $hooks Page Hook.
242 */
243 public function admin_enqueue_scripts( $hooks ) {
244
245 if ( 'settings_page_password-protected' === $hooks || 'toplevel_page_password-protected' === $hooks ) {
246 global $Password_Protected;
247 wp_enqueue_style( 'password-protected-page-script', PASSWORD_PROTECTED_URL . 'assets/css/admin.css', array(), $Password_Protected->version );
248 wp_enqueue_script( 'password-protected-admin-script', PASSWORD_PROTECTED_URL . 'assets/js/admin.js', array('jquery'), $Password_Protected->version );
249 wp_localize_script(
250 'password-protected-admin-script',
251 'passwordProtectedAdminObject',
252 array(
253 'imageURL' => PASSWORD_PROTECTED_URL . 'assets/images/',
254 'description' => __( 'Unlock unmatched website protection with<br>advanced security features', 'password-protected' ),
255 'buttonText' => __( 'Get Password Protected Pro', 'password-protected' ),
256 'buttonRedirect' => add_query_arg(
257 array(
258 'page' => 'password-protected',
259 'tab' => 'getpro',
260 ),
261 admin_url( 'admin.php' )
262 ),
263 )
264 );
265 }
266 }
267
268 public function init() {
269
270 if ( ! class_exists( 'Password_Protected_Pro' ) ) {
271
272 add_action( 'password_protected_subtab_exclude-from-protection_content', array( $this, 'dummy_content' ) );
273 add_action( 'text_before_after_login_form', array( $this, 'dummy_content' ) );
274 add_action( 'password_protected_subtab_attempt-limitation_content', array( $this, 'dummy_content' ) );
275 add_action( 'password_protected_subtab_bypass-url_content', array( $this, 'dummy_content' ) );
276 add_action( 'password_protected_tab_manage_passwords_content', array( $this, 'dummy_content' ) );
277 add_action( 'password_protected_subtab_post-type-protection_content', array( $this, 'dummy_content' ) );
278 add_action( 'password_protected_subtab_taxonomy-protection_content', array( $this, 'dummy_content' ) );
279 add_action( 'password_protected_subtab_whitelist-user-role_content', array( $this, 'dummy_content' ) );
280 add_action( 'password_protected_subtab_wp-admin-protection_content', array( $this, 'dummy_content' ) );
281 add_action( 'password_protected_subtab_activity_logs_content', array( $this, 'dummy_content' ) );
282
283 add_action( 'password_protected_subtab_logo-styles_content', array( $this, 'dummy_content' ) );
284 add_action( 'password_protected_subtab_label-styles_content', array( $this, 'dummy_content' ) );
285 add_action( 'password_protected_subtab_field-styles_content', array( $this, 'dummy_content' ) );
286 add_action( 'password_protected_subtab_button-styles_content', array( $this, 'dummy_content' ) );
287 add_action( 'password_protected_subtab_remember-me-styles_content', array( $this, 'dummy_content' ) );
288 add_action( 'password_protected_subtab_form-background_content', array( $this, 'dummy_content' ) );
289 add_action( 'password_protected_subtab_body-background_content', array( $this, 'dummy_content' ) );
290 add_action( 'password_protected_subtab_below-form_content', array( $this, 'dummy_content' ) );
291 add_action( 'password_protected_subtab_below-page_content', array( $this, 'dummy_content' ) );
292 add_action( 'password_protected_subtab_custom-css_content', array( $this, 'dummy_content' ) );
293 add_action( 'password_protected_subtab_password-request_content', array( $this, 'dummy_content' ) );
294 add_action( 'password_protected_subtab_requests_content', array( $this, 'dummy_content' ) );
295 add_action( 'password_protected_subtab_email-templates_content', array( $this, 'dummy_content' ) );
296 }
297
298 if ( isset( $_GET['page'] ) && 'password-protected-get-pro' === $_GET['page'] ) {
299 wp_redirect( 'https://passwordprotectedwp.com/pricing/?utm_source=Plugin&utm_medium=Submenu' );
300 exit;
301 }
302 }
303
304 /**
305 * Add Privacy Policy
306 */
307 public function add_privacy_policy() {
308
309 if ( ! function_exists( 'wp_add_privacy_policy_content' ) ) {
310 return 1;
311 }
312
313 $content = _x( 'The Password Protected plugin stores a cookie on successful password login containing a hashed version of the entered password. It does not store any information about the user. The cookie stored is named <code>bid_n_password_protected_auth</code> where <code>n</code> is the blog ID in a multisite network', 'privacy policy content', 'password-protected' );
314
315 wp_add_privacy_policy_content( __( 'Password Protected Plugin', 'password-protected' ), wp_kses_post( wpautop( $content, false ) ) );
316
317 }
318
319 /**
320 * Admin Menu
321 */
322 public function admin_menu() {
323
324 $capability = apply_filters( 'password_protected_options_page_capability', 'manage_options' );
325 $this->settings_page_id = add_options_page(
326 __( 'Password Protected', 'password-protected' ),
327 __( 'Password Protected', 'password-protected' ),
328 $capability,
329 'password-protected',
330 array(
331 $this,
332 'settings_page'
333 )
334 );
335 add_menu_page(
336 'Password Protected',
337 'Password Protected',
338 'manage_options',
339 'password-protected',
340 array( $this, 'pp_admin_menu_page_callback' ),
341 'dashicons-lock',
342 99
343 );
344 add_action( 'load-' . $this->settings_page_id, array( $this, 'add_help_tabs' ), 20 );
345
346
347 if ( ! class_exists( 'Password_Protected_Pro' ) ) {
348 add_submenu_page(
349 'password-protected',
350 __( 'Get Pro Now', 'password-protected' ),
351 __( '⭐ Get Pro Now', 'password-protected' ),
352 'manage_options',
353 'password-protected-get-pro',
354 array( $this, 'password_protected_get_pro_features' )
355 );
356 }
357 }
358
359 /**
360 * Settings Page
361 */
362 public function settings_page() {
363 ?>
364
365 <div class="wrap">
366 <div id="icon-options-general" class="icon32"><br /></div>
367 <h2><?php _e( 'Password Protected Settings', 'password-protected' ) ?></h2>
368 <form method="post" action="options.php">
369 <?php
370 settings_fields( 'password-protected' );
371 do_settings_sections( 'password-protected' );
372 ?>
373 <p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="<?php _e( 'Save Changes' ) ?>"></p>
374 </form>
375 <?php
376 // do_settings_sections( 'password-protected-login-designer' );
377 ?>
378
379 <div id="help-notice">
380 <?php do_settings_sections( 'password-protected-compat' ); ?>
381 </div>
382 </div>
383
384 <?php
385 }
386
387 /** @since 2.6
388 * Admin Menu Settings Page
389 */
390 public function pp_admin_menu_page_callback() {
391 $tab = ( isset( $_GET['tab'] ) && sanitize_text_field( $_GET['page'] ) == 'password-protected' ) ? sanitize_text_field( $_GET['tab'] ) : 'general';
392 $subtab = ( isset( $_GET['sub-tab'] ) && sanitize_text_field( $_GET['page'] ) == 'password-protected' ) ? sanitize_text_field( $_GET['sub-tab'] ) : '';
393
394 // for backward compatibility.
395 $this->setting_tabs = array_filter(
396 $this->setting_tabs,
397 function( $tab ) {
398 return isset( $tab['title'] ) && isset( $tab['slug'] ) && isset( $tab['icon'] );
399 }
400 );
401 if ( isset( $this->setting_tabs[ $tab ]['sub-tabs'] ) && ! empty( $this->setting_tabs[ $tab ]['sub-tabs'] ) ) {
402 $this->setting_tabs[ $tab ]['sub-tabs'] = array_filter(
403 $this->setting_tabs[ $tab ]['sub-tabs'],
404 function ( $subtab ) {
405 return isset( $subtab['title'] ) && isset( $subtab['slug'] );
406 }
407 );
408 }
409 ?>
410 <div class="wrap">
411 <div class="wrap-row" style="display: <?php echo class_exists( 'Password_Protected_Pro' ) ? 'block' : 'flex'; ?>;">
412 <?php $attributes = class_exists( 'Password_Protected_Pro' ) ? '' : 'class="wrap-col-70"'; ?>
413 <div <?php echo $attributes; ?>>
414 <?php settings_errors(); ?>
415
416 <div class="pp-wrapper">
417
418 <div class="pp-nav-wrapper">
419 <?php foreach( $this->setting_tabs as $index => $setting_tab ) : ?>
420 <div class="pp-nav-tab <?php echo ( $tab === $setting_tab['slug'] ) ? 'pp-nav-tab-active' : ''; ?> <?php echo ( 'getpro' === $setting_tab['slug'] ) ? 'pp-pro-tab' : ''; ?>">
421 <a href="<?php echo admin_url( 'admin.php?page=password-protected&tab=' . $setting_tab['slug'] ); ?>" class=" ">
422 <?php if ( filter_var( $setting_tab['icon'], FILTER_VALIDATE_URL ) ) : ?>
423 <span>
424 <img src="<?php echo esc_url( $setting_tab['icon'] ); ?>" alt="">
425 </span>
426 <?php else : ?>
427 <span class="dashicons <?php echo $setting_tab['icon']; ?>"></span>
428 <?php endif; ?>
429 <?php echo $setting_tab['title']; ?>
430 </a>
431 </div>
432 <?php endforeach; ?>
433 </div>
434
435 <div class="pp-content-wrapper">
436 <?php if ( isset( $this->setting_tabs[ $tab ] ) && isset( $this->setting_tabs[ $tab ]['sub-tabs'] ) && ! empty( $this->setting_tabs[ $tab ]['sub-tabs'] ) ) : ?>
437 <div class="pp-sub-tabs-wrapper">
438 <div class="pp-subtabs-links">
439 <?php if ( empty( $subtab ) ) { ?>
440 <?php
441 $subtab = array_keys( $this->setting_tabs[ $tab ]['sub-tabs'] );
442 $subtab = $subtab[0];
443 ?>
444 <?php } ?>
445 <?php foreach ( $this->setting_tabs[ $tab ]['sub-tabs'] as $sub_tab ) : ?>
446 <a class="<?php echo $subtab === $sub_tab['slug'] ? 'active' : '' ?>" href="<?php echo admin_url( 'admin.php?page=password-protected&tab=' . $tab . '&sub-tab=' . $sub_tab['slug'] ); ?>"><?php echo $sub_tab['title']; ?></a>
447 <?php endforeach; ?>
448 </div>
449 </div>
450 <?php endif; ?>
451
452 <div class="pp-settings-wrapper">
453 <?php $this->password_protected_render_tab_content( $tab, $subtab ); ?>
454 </div>
455 </div>
456 </div>
457 </div>
458
459 <?php $attributes = class_exists( 'Password_Protected_Pro' ) ? 'style="display:none;"' : 'id="pp-sidebar" class="wrap-col-25"'; ?>
460 <div <?php echo $attributes; ?>>
461 <?php
462 $_tab = '';
463 if ( isset( $_GET['tab'] ) ) {
464 $_tab = sanitize_text_field( wp_unslash( $_GET['tab'] ) );
465 }
466 if ( 'getpro' !== $_tab ) :
467 do_settings_sections( 'password-protected-try-pro' );
468 // do_settings_sections( 'password-protected-login-designer' );
469 do_action('password_protected_sidebar');
470 endif;
471 ?>
472 </div>
473 </div>
474 </div>
475 <?php
476 }
477
478 public function password_protected_page_description_tab() {
479 echo '<form action="options.php" method="post" enctype="multipart/form-data">';
480 settings_fields( 'password-protected-advanced-protected-page-content' );
481 do_settings_sections( 'password-protected&tab=advanced&sub-tab=password-protected-page-description' );
482 do_action('text_before_after_login_form', $_GET);
483 submit_button();
484 echo '</form>';
485 }
486
487 /**
488 * password protected render settings page in menu
489 */
490 public function password_protected_render_tab_content( $tab, $sub_tab ) {
491
492 switch ( $tab ) {
493 case 'general':
494 do_settings_sections( 'password-protected-help' );
495 echo '<form method="post" action="options.php">';
496 settings_fields( 'password-protected' );
497 do_settings_sections( 'password-protected' );
498 submit_button();
499 echo '</form>';
500 break;
501
502 case 'help':
503 ?>
504 <div id="help-notice">
505 <?php do_settings_sections( 'password-protected-compat' ); ?>
506 </div>
507 <?php
508 break;
509
510 case 'getpro':
511 $this->password_protected_get_pro_features();
512 break;
513
514 case $tab:
515
516 if ( ! empty( $sub_tab ) ) {
517 do_action(
518 'password_protected_subtab_' . $sub_tab . '_content',
519 $this->setting_tabs[ $tab ]['sub-tabs'][ $sub_tab ]
520 );
521 } else {
522 do_action(
523 'password_protected_tab_' . $tab . '_content',
524 $this->setting_tabs[ $tab ]
525 );
526 }
527 break;
528 }
529 }
530
531 /**
532 * Add Help Tabs
533 */
534 public function add_help_tabs() {
535
536 global $wp_version;
537
538 if ( version_compare( $wp_version, '3.3', '<' ) ) {
539 return 1;
540 }
541
542 do_action( 'password_protected_help_tabs', get_current_screen() );
543
544 }
545
546 /**
547 * Help Tabs
548 *
549 * @param object $current_screen Screen object.
550 */
551 public function help_tabs( $current_screen ) {
552
553 $current_screen->add_help_tab( array(
554 'id' => 'PASSWORD_PROTECTED_SETTINGS',
555 'title' => __( 'Password Protected', 'password-protected' ),
556 'content' => __( '<p><strong>Password Protected Status</strong><br />Turn on/off password protection.</p>', 'password-protected' )
557 . __( '<p><strong>Protected Permissions</strong><br />Allow access for logged in users and administrators without needing to enter a password. You will need to enable this option if you want administrators to be able to preview the site in the Theme Customizer. Also allow RSS Feeds to be accessed when the site is password protected.</p>', 'password-protected' )
558 . __( '<p><strong>Password Fields</strong><br />To set a new password, enter it into both fields. You cannot set an `empty` password. To disable password protection uncheck the Enabled checkbox.</p>', 'password-protected' )
559 ) );
560
561 }
562
563 /**
564 * Settings API
565 */
566 public function password_protected_settings() {
567 // general tab
568 add_settings_section(
569 'password_protected',
570 __( 'Password Protected Configuration', 'password-protected' ),
571 array( $this, 'password_protected_settings_section' ),
572 $this->options_group
573 );
574
575 add_settings_field(
576 'password_protected_status',
577 __( 'Password Protected Status', 'password-protected' ),
578 array( $this, 'password_protected_status_field' ),
579 $this->options_group,
580 'password_protected'
581 );
582
583 add_settings_field(
584 'password_protected_permissions',
585 __( 'Protected Permissions', 'password-protected' ),
586 array( $this, 'password_protected_permissions_field' ),
587 $this->options_group,
588 'password_protected'
589 );
590
591 add_settings_field(
592 'password_protected_password',
593 __( 'New Password', 'password-protected' ),
594 array( $this, 'password_protected_password_field' ),
595 $this->options_group,
596 'password_protected'
597 );
598
599 add_settings_field(
600 'password_protected_allowed_ip_addresses',
601 __( 'Allow IP Addresses', 'password-protected' ),
602 array( $this, 'password_protected_allowed_ip_addresses_field' ),
603 $this->options_group,
604 'password_protected'
605 );
606
607 add_settings_field(
608 'password_protected_remember_me',
609 __( 'Allow Remember me', 'password-protected' ),
610 array( $this, 'password_protected_remember_me_field' ),
611 $this->options_group,
612 'password_protected'
613 );
614
615 add_settings_field(
616 'password_protected_remember_me_lifetime',
617 __( 'Remember for this many days', 'password-protected' ),
618 array( $this, 'password_protected_remember_me_lifetime_field' ),
619 $this->options_group,
620 'password_protected'
621 );
622
623 // password protected advanced tab
624 add_settings_section(
625 'password-protected-advanced-tab',
626 'Password Protected Page description',
627 array( $this, 'password_protected_page_description' ),
628 'password-protected&tab=advanced&sub-tab=password-protected-page-description'
629 );
630
631 add_settings_field(
632 'text-above-password',
633 __( 'Text Above Password Field', 'password-protected' ),
634 array( $this, 'password_protected_text_above_password' ),
635 'password-protected&tab=advanced&sub-tab=password-protected-page-description',
636 'password-protected-advanced-tab'
637 );
638
639 add_settings_field(
640 'text-below-password',
641 __( 'Text Below Password Field ', 'password-protected' ),
642 array( $this, 'password_protected_text_below_password' ),
643 'password-protected&tab=advanced&sub-tab=password-protected-page-description',
644 'password-protected-advanced-tab'
645 );
646
647 add_settings_section(
648 'password-protected-advanced-tab-cache-issue',
649 'Cache Issue',
650 '__return_null',
651 'password-protected&tab=advanced&sub-tab=cache-issue'
652 );
653
654 add_settings_field(
655 'password-protected-advance-cache',
656 __( 'Advance Cache Fix', 'password-protected' ),
657 array( $this, 'password_protected_use_transient' ),
658 'password-protected&tab=advanced&sub-tab=cache-issue',
659 'password-protected-advanced-tab-cache-issue',
660 array(
661 'label_for' => 'password-protected-use-transient',
662 )
663 );
664
665 // password protected help tab
666 add_settings_section(
667 'password-protected-help',
668 '',
669 array( $this, 'password_protected_help_tab' ),
670 'password-protected-help'
671 );
672
673 if( !$this->password_protected_pro_is_installed_and_activated() ) {
674 add_settings_section(
675 'password-protected-try-pro',
676 '',
677 array( $this, 'password_protected_try_pro' ),
678 'password-protected-try-pro'
679 );
680 }
681
682 if ( ! $this->login_designer_is_installed_and_activated() ) {
683 /* add_settings_section(
684 'password-protected-login-designer',
685 '',
686 array( $this, 'password_protected_login_designer' ),
687 'password-protected-login-designer'
688 ); */
689 }
690
691 // registering settings
692 register_setting( $this->options_group, 'password_protected_status', 'intval' );
693 register_setting( $this->options_group, 'password_protected_feeds', 'intval' );
694 register_setting( $this->options_group, 'password_protected_rest', 'intval' );
695 register_setting( $this->options_group, 'password_protected_administrators', 'intval' );
696 register_setting( $this->options_group, 'password_protected_users', 'intval' );
697 register_setting( $this->options_group, 'password_protected_password', array( $this, 'sanitize_password_protected_password' ) );
698 register_setting( $this->options_group, 'password_protected_allowed_ip_addresses', array( $this, 'sanitize_ip_addresses' ) );
699 register_setting( $this->options_group, 'password_protected_remember_me', 'boolval' );
700 register_setting( $this->options_group, 'password_protected_remember_me_lifetime', 'intval' );
701
702 register_setting( 'password-protected-advanced-protected-page-content', 'password_protected_text_above_password', array( 'type' => 'string' ) );
703 register_setting( 'password-protected-advanced-protected-page-content', 'password_protected_text_below_password', array( 'type' => 'string' ) );
704
705 register_setting( 'password_protected_cache_issue', 'password_protected_use_transient' );
706 }
707
708 /**
709 * Sanitize Password Field Input
710 *
711 * @param string $val Password.
712 * @return string Sanitized password.
713 */
714 public function sanitize_password_protected_password( $val ) {
715
716 $old_val = get_option( 'password_protected_password' );
717
718 if ( is_array( $val ) ) {
719 if ( empty( $val['new'] ) ) {
720 return $old_val;
721 } elseif ( empty( $val['confirm'] ) ) {
722 add_settings_error( 'password_protected_password', 'password_protected_password', __( 'New password not saved. When setting a new password please enter it in both fields.', 'password-protected' ) );
723 return $old_val;
724 } elseif ( $val['new'] != $val['confirm'] ) {
725 add_settings_error( 'password_protected_password', 'password_protected_password', __( 'New password not saved. Password fields did not match.', 'password-protected' ) );
726 return $old_val;
727 } elseif ( $val['new'] == $val['confirm'] ) {
728 add_settings_error( 'password_protected_password', 'password_protected_password', __( 'New password saved.', 'password-protected' ), 'updated' );
729 return $val['new'];
730 }
731 return get_option( 'password_protected_password' );
732 }
733
734
735 return $val;
736
737 }
738
739 /**
740 * Sanitize IP Addresses
741 *
742 * @param string $val IP addresses.
743 * @return string Sanitized IP addresses.
744 */
745 public function sanitize_ip_addresses( $val ) {
746 $un_sanitized_value = $val;
747
748 $ip_addresses = explode( "\n", $val );
749 $ip_addresses = array_map( 'sanitize_text_field', $ip_addresses );
750 $ip_addresses = array_map( 'trim', $ip_addresses );
751 $ip_addresses = array_map( array( $this, 'validate_ip_address' ), $ip_addresses );
752 $ip_addresses = array_filter( $ip_addresses );
753
754 $val = implode( "\n", $ip_addresses );
755
756 return apply_filters( 'password_protected__sanitize_ip_addresses', $val, $un_sanitized_value );
757
758 }
759
760 /**
761 * Validate IP Address
762 *
763 * @param string $ip_address IP Address.
764 * @return string Validated IP Address.
765 */
766 private function validate_ip_address( $ip_address ) {
767
768 return filter_var( $ip_address, FILTER_VALIDATE_IP );
769
770 }
771
772 /**
773 * Password Protected Section
774 */
775 public function password_protected_settings_section() {
776
777 return 1;
778
779 }
780
781 /**
782 * Password Protection Status Field
783 */
784 public function password_protected_status_field() {
785
786 echo '
787 <div class="pp-toggle-wrapper">
788 <input type="checkbox" name="password_protected_status" id="password_protected_status" value="1" ' . checked( 1, get_option( 'password_protected_status' ), false ) . ' />
789 <label class="pp-toggle" for="password_protected_status">
790 <span class="pp-toggle-slider"></span>
791 </label>
792 </div>
793 <p>
794 <label for="password_protected_status">' . __( 'Do you want to enable password protection for whole site?', 'password-protected' ) . '</label>
795 </p>
796 ';
797
798 }
799
800 /**
801 * Password Protection Permissions Field
802 */
803 public function password_protected_permissions_field() {
804
805 echo '<p>
806 <label for="password_protected_administrators">
807 <input type="checkbox" name="password_protected_administrators" id="password_protected_administrators" value="1" ' . checked( 1, get_option( 'password_protected_administrators' ), false ) . ' />'
808 . __( 'Allow Administrators', 'password-protected' )
809 . '</label>
810 </p>
811 <p>
812 <label for="password_protected_users">
813 <input type="checkbox" name="password_protected_users" id="password_protected_users" value="1" ' . checked( 1, get_option( 'password_protected_users' ), false ) . ' />'
814 . __( 'Allow Logged In Users', 'password-protected' )
815 . '</label>
816 </p>
817 <p>
818 <label for="password_protected_feeds">
819 <input type="checkbox" name="password_protected_feeds" id="password_protected_feeds" value="1" ' . checked( 1, get_option( 'password_protected_feeds' ), false ) . ' />'
820 . __( 'Allow RSS Feeds', 'password-protected' )
821 . '</label>
822 </p>
823 <p>
824 <label for="password_protected_rest">
825 <input type="checkbox" name="password_protected_rest" id="password_protected_rest" value="1" ' . checked( 1, get_option( 'password_protected_rest' ), false ) . ' />'
826 . __( 'Allow REST API', 'password-protected' )
827 . '</label>
828 </p>';
829
830 }
831
832 /**
833 * Password Field
834 */
835 public function password_protected_password_field() {
836
837 echo '<input type="password" name="password_protected_password[new]" id="password_protected_password_new" size="16" value="" autocomplete="off"> <p><span class="description">' . __( 'If you would like to change the password, type a new one. Otherwise, leave this blank.', 'password-protected' ) . '</span></p><br>
838 <input type="password" name="password_protected_password[confirm]" id="password_protected_password_confirm" size="16" value="" autocomplete="off"> <p><span class="description">' . __( 'Type your new password again.', 'password-protected' ) . '</span></p>';
839
840 }
841
842 /**
843 * Allowed IP Addresses Field
844 */
845 public function password_protected_allowed_ip_addresses_field() {
846 echo '<textarea name="password_protected_allowed_ip_addresses" id="password_protected_allowed_ip_addresses" rows="3" />' . esc_html( get_option( 'password_protected_allowed_ip_addresses' ) ) . '</textarea>';
847
848 echo '<p class="description">' . esc_html__( 'Enter one IP address per line.', 'password-protected' );
849 if ( isset( $_SERVER['REMOTE_ADDR'] ) ) {
850 echo ' ' . esc_html( sprintf( __( 'Your IP address is %s.', 'password-protected' ), $_SERVER['REMOTE_ADDR'] ) );
851 }
852 echo '</p>';
853
854 }
855
856 /**
857 * Remember Me Field
858 */
859 public function password_protected_remember_me_field() {
860
861 echo '<div class="pp-toggle-wrapper">
862 <input type="checkbox" name="password_protected_remember_me" id="password_protected_remember_me" value="1" ' . checked( 1, get_option( 'password_protected_remember_me' ), false ) . ' />
863 <label class="pp-toggle" for="password_protected_remember_me">
864 <span class="pp-toggle-slider"></span>
865 </label>
866 </div>
867 <p>
868 <label for="password_protected_remember_me">' . __( 'Allow Remember me', 'password-protected' ) . '</label>
869 </p>';
870
871 }
872
873 /**
874 * Remember Me lifetime field
875 */
876 public function password_protected_remember_me_lifetime_field() {
877
878 echo '<label><input name="password_protected_remember_me_lifetime" id="password_protected_remember_me_lifetime" min="1" type="number" value="' . get_option( 'password_protected_remember_me_lifetime', 14 ) . '" /></label>';
879
880 }
881
882 /**
883 * Password Protected Page description
884 */
885 public function password_protected_page_description() {
886 return 1;
887 }
888
889 /**
890 * Password Protected text above passsword
891 */
892 public function password_protected_text_above_password() {
893 echo '<label><textarea id="password_protected_text_above_password" name="password_protected_text_above_password" rows="4" cols="50" class="regular-text">' . esc_attr( get_option('password_protected_text_above_password') ) . '</textarea></label>';
894 }
895
896 /**
897 * Password Protected below above passsword
898 */
899 public function password_protected_text_below_password() {
900 echo '<label><textarea id="password_protected_text_below_password" name="password_protected_text_below_password" rows="4" cols="50" class="regular-text">' . esc_attr( get_option('password_protected_text_below_password') ) . '</textarea></label>';
901 }
902
903 public function password_protected_use_transient() {
904 $use_transient = get_option( 'password_protected_use_transient', 'default' );
905
906 $cache_issue = array(
907 array(
908 'name' => 'default',
909 'title' => __( 'Use default settings', 'password-protected' ),
910 ),
911 array(
912 'name' => 'transient',
913 'title' => __( 'You can enable this option if you are having trouble with cookies due to cache or server restrictions.', 'password-protected' ),
914 'description' => __( 'Note: It uses transients, which are saved based on the user\'s IP address, unlike cookies that are tied to the specific browser. This means that once a user logs in using any browser, they can access the page from any other browser as long as they are on the same IP address.', 'password-protected' ),
915 ),
916 );
917
918 foreach ( $cache_issue as $issue ) :
919 echo '<p>
920 <label>
921 <input type="radio" name="password_protected_use_transient" value="' . esc_attr( $issue['name'] ) . '" ' . checked( $use_transient, $issue['name'], false ) . ' />' . esc_html( $issue['title'] ) . '
922 </label>
923 </p>';
924
925 if ( isset( $issue['description'] ) ) :
926 echo '<p class="desc"><strong>' . esc_attr( $issue['description'] ) . '</strong></p>';
927 endif;
928 endforeach;
929 }
930
931 /**
932 * Help Tab text field
933 */
934 public function password_protected_help_tab() {
935 echo '<div class="pp-help-notice">
936 <p>'
937 . __( 'Password protect your web site. Users will be asked to enter a password to view the site.', 'password-protected' )
938 . '<br />'
939 . __( 'For more information about Password Protected settings, view the "Help" tab at the top of this page.', 'password-protected' )
940 . '</p>
941 </div>';
942 }
943
944 /**
945 * Try pro sideabr
946 */
947 public function password_protected_try_pro() {
948 $image_url = PASSWORD_PROTECTED_URL . 'assets/images/';
949 echo '<div class="pp-sidebar-widget">
950 <div class="pp-container">
951
952 <div class="pp-sidebar-header">
953 <p class="heading-1">Level up your WordPress protection with</p>
954 <p class="heading-2">Password <img src="' . $image_url . 'crown.png" /> Protected <span>Pro</span></p>
955 </div>
956
957 <div class="pp-sidebar-body">
958 <ul>
959 <li>
960 <span class="sidebar-body-image-container"><img src="' . $image_url . 'lock-2.png" alt="" /></span> <span class="sidebar-body-text-container">Protect Specific Post Types</span>
961 </li>
962 <li>
963 <span class="sidebar-body-image-container"><img src="' . $image_url . 'lock-2.png" alt="" /></span> <span class="sidebar-body-text-container">Whitelist Specific User Role</span>
964 </li>
965 <li>
966 <span class="sidebar-body-image-container"><img src="' . $image_url . 'lock-2.png" alt="" /></span> <span class="sidebar-body-text-container">Password Protect WP-Admin</span>
967 </li>
968 <li>
969 <span class="sidebar-body-image-container"><img src="' . $image_url . 'lock-2.png" alt="" /></span> <span class="sidebar-body-text-container">Password Attempt Activity Report</span>
970 </li>
971 <li>
972 <span class="sidebar-body-image-container"><img src="' . $image_url . 'lock-2.png" alt="" /></span> <span class="sidebar-body-text-container">Specific Post/Page Protection</span>
973 </li>
974 <li>
975 <span class="sidebar-body-image-container"><img src="' . $image_url . 'lock-2.png" alt="" /></span> <span class="sidebar-body-text-container">Certain Page/Posts Exclusions</span>
976 </li>
977 <li>
978 <span class="sidebar-body-image-container"><img src="' . $image_url . 'lock-2.png" alt="" /></span> <span class="sidebar-body-text-container">Password Attempts Restriction</span>
979 </li>
980 <li>
981 <span class="sidebar-body-image-container"><img src="' . $image_url . 'lock-2.png" alt="" /></span> <span class="sidebar-body-text-container">Password Expiration and Usage Limit</span>
982 </li>
983 <li>
984 <span class="sidebar-body-image-container"><img src="' . $image_url . 'lock-2.png" alt="" /></span> <span class="sidebar-body-text-container">Bypass URL (Post, Page, Category, etc.)</span>
985 </li>
986 <li>
987 <span class="sidebar-body-image-container"><img src="' . $image_url . 'lock-2.png" alt="" /></span> <span class="sidebar-body-text-container">Activity Log For Each Password Attempt</span>
988 </li>
989 <li>
990 <span class="sidebar-body-image-container"><img src="' . $image_url . 'lock-2.png" alt="" /></span> <span class="sidebar-body-text-container">Multiple Password Management</span>
991 </li>
992 </ul>
993 </div>
994 <div class="pp-sidebar-footer">
995 <a target="_blank" href="https://passwordprotectedwp.com/pricing/?utm_source=plugin&utm_medium=side_banner&utm_campaign=plugin">' . esc_html__( 'Get Password Protected Pro', 'password-protected' ) . '</a>
996 </div>
997 </div>
998 </div>';
999 }
1000
1001 public function password_protected_login_designer() {
1002 $search_login_designer = add_query_arg(
1003 array(
1004 's' => 'login designer',
1005 'tab' => 'search',
1006 'type' => 'term',
1007 ),
1008 admin_url( 'plugin-install.php' )
1009 );
1010 echo '<div class="pp-sidebar-widget">
1011 <div id="pp-sidebar-box">
1012 <h3>' .
1013 sprintf(
1014 __( '%1$s Now you can customize your Password Protected screen with the %3$s %2$s', 'password-protected' ),
1015 '🎨',
1016 '🌈',
1017 '<a href="' . $search_login_designer . '">' . __( 'Login Designer Plugin', 'password-protected' ) . '</a>'
1018 )
1019 . '</h3>
1020
1021 <img width="100%" src="'. PASSWORD_PROTECTED_URL .'assets/images/login-designer-demo.gif" alt="Login Designer Demo GIF">
1022
1023 <h3>
1024 <a class="pp-try button-primary" href="' . $search_login_designer . '">
1025 👉 ' . __( 'Try it now! It\'s Free', 'password-protected' ) . '
1026 </a>
1027 </h3>
1028 </div>
1029 </div>';
1030 }
1031
1032 /**
1033 * Pre-update 'password_protected_password' Option
1034 *
1035 * Before the password is saved, MD5 it!
1036 * Doing it in this way allows developers to intercept with an earlier filter if they
1037 * need to do something with the plaintext password.
1038 *
1039 * @param string $newvalue New Value.
1040 * @param string $oldvalue Old Value.
1041 * @return string Filtered new value.
1042 */
1043 public function pre_update_option_password_protected_password( $newvalue, $oldvalue ) {
1044
1045 global $Password_Protected;
1046
1047 if ( $newvalue != $oldvalue ) {
1048 $newvalue = $Password_Protected->encrypt_password( $newvalue );
1049 }
1050
1051 return $newvalue;
1052
1053 }
1054
1055 /**
1056 * Plugin Row Meta
1057 *
1058 * Adds GitHub and translate links below the plugin description on the plugins page.
1059 *
1060 * @param array $plugin_meta Plugin meta display array.
1061 * @param string $plugin_file Plugin reference.
1062 * @param array $plugin_data Plugin data.
1063 * @param string $status Plugin status.
1064 * @return array Plugin meta array.
1065 */
1066 public function plugin_row_meta( $plugin_meta, $plugin_file, $plugin_data, $status ) {
1067
1068 if ( 'password-protected/password-protected.php' == $plugin_file ) {
1069 $plugin_meta[] = sprintf( '<a href="%s">%s</a>', __( 'http://github.com/benhuson/password-protected', 'password-protected' ), __( 'GitHub', 'password-protected' ) );
1070 $plugin_meta[] = sprintf( '<a href="%s">%s</a>', __( 'https://translate.wordpress.org/projects/wp-plugins/password-protected', 'password-protected' ), __( 'Translate', 'password-protected' ) );
1071 }
1072
1073 return $plugin_meta;
1074
1075 }
1076
1077 /**
1078 * Plugin Action Links
1079 *
1080 * Adds settings link on the plugins page.
1081 *
1082 * @param array $actions Plugin action links array.
1083 * @return array Plugin action links array.
1084 */
1085 public function plugin_action_links( $actions ) {
1086
1087 $actions[] = sprintf( '<a href="%s">%s</a>', admin_url( 'admin.php?page=password-protected' ), __( 'Settings', 'password-protected' ) );
1088 return $actions;
1089
1090 }
1091
1092 /**
1093 * Password Admin Notice
1094 * Warns the user if they have enabled password protection but not entered a password
1095 */
1096 public function password_protected_admin_notices() {
1097 global $Password_Protected;
1098
1099 // Check Support
1100 $screens = $this->plugin_screen_ids( array( 'dashboard', 'plugins' ) );
1101 if ( $this->is_current_screen( $screens ) ) {
1102 $supported = $Password_Protected->is_plugin_supported();
1103
1104 if ( is_wp_error( $supported ) ) {
1105 echo $this->admin_error_display( $supported->get_error_message( $supported->get_error_code() ) );
1106 }
1107 }
1108
1109 // Settings
1110 if ( $this->is_current_screen( $this->plugin_screen_ids() ) ) {
1111 $status = get_option( 'password_protected_status' );
1112 $pwd = get_option( 'password_protected_password' );
1113
1114 if ( (bool) $status && empty( $pwd ) ) {
1115 $error_message = __( 'You have enabled password protection but not yet set a password. Please set one below.', 'password-protected' );
1116 $error = apply_filters( 'password_protected_password_status_activation', $error_message );
1117 if( !empty( $error ) ) {
1118 echo $this->admin_error_display( $error );
1119 }
1120 }
1121
1122 if ( current_user_can( 'manage_options' ) && ( (bool) get_option( 'password_protected_administrators' ) || (bool) get_option( 'password_protected_users' ) ) ) {
1123 if ( (bool) get_option( 'password_protected_administrators' ) && (bool) get_option( 'password_protected_users' ) ) {
1124 echo $this->admin_error_display( __( 'You have enabled password protection and allowed administrators and logged in users - other users will still need to enter a password to view the site.', 'password-protected' ) );
1125 } elseif ( (bool) get_option( 'password_protected_administrators' ) ) {
1126 if ( (bool) get_option( 'password_protected_status' ) ) {
1127 echo $this->admin_error_display( __( 'You have enabled password protection and allowed administrators - other users will still need to enter a password to view the site.', 'password-protected' ) );
1128 }
1129 } elseif ( (bool) get_option( 'password_protected_users' ) ) {
1130 if ( (bool) get_option( 'password_protected_status' ) ) {
1131 echo $this->admin_error_display( __( 'You have enabled password protection and allowed logged in users - other users will still need to enter a password to view the site.', 'password-protected' ) );
1132 }
1133 }
1134 }
1135
1136 }
1137
1138 }
1139
1140 /**
1141 * Admin Error Display
1142 *
1143 * Returns a string wrapped in HTML to display an admin error.
1144 *
1145 * @param string $string Error string.
1146 * @return string HTML error.
1147 */
1148 private function admin_error_display( $string ) {
1149
1150 return '<div class="error"><p>' . $string . '</p></div>';
1151
1152 }
1153
1154 /**
1155 * Is Current Screen
1156 *
1157 * Checks wether the admin is displaying a specific screen.
1158 *
1159 * @param string|array $screen_id Admin screen ID(s).
1160 * @return boolean
1161 */
1162 public function is_current_screen( $screen_id ) {
1163
1164 if ( function_exists( 'get_current_screen' ) ) {
1165 $current_screen = get_current_screen();
1166 if ( ! is_array( $screen_id ) ) {
1167 $screen_id = array( $screen_id );
1168 }
1169 if ( in_array( $current_screen->id, $screen_id ) ) {
1170 return true;
1171 }
1172 }
1173
1174 return false;
1175
1176 }
1177
1178 /**
1179 * Plugin Screen IDs
1180 *
1181 * @param string|array $screen_id Additional screen IDs to add to the returned array.
1182 * @return array Screen IDs.
1183 */
1184 public function plugin_screen_ids( $screen_id = '' ) {
1185
1186 $screen_ids = array( 'options-' . $this->options_group, 'settings_page_' . $this->options_group );
1187 array_push( $screen_ids, 'toplevel_page_'.$this->options_group );
1188 if ( ! empty( $screen_id ) ) {
1189 if ( is_array( $screen_id ) ) {
1190 $screen_ids = array_merge( $screen_ids, $screen_id );
1191 } else {
1192 $screen_ids[] = $screen_id;
1193 }
1194 }
1195 // toplevel_page_password-protected
1196 return $screen_ids;
1197
1198 }
1199
1200 /**
1201 * @return bool
1202 * true if password protected pro is installed and activated otherwise false
1203 */
1204 public function password_protected_pro_is_installed_and_activated(): bool {
1205 return class_exists( 'Password_Protected_Pro' );
1206 }
1207
1208 public function login_designer_is_installed_and_activated() {
1209 return class_exists( 'Login_designer' );
1210 }
1211
1212 /**
1213 * @return void
1214 * Display Pro Features
1215 */
1216 public function password_protected_get_pro_features() {
1217 $image_url = PASSWORD_PROTECTED_URL . 'assets/images/';
1218 echo '<div class="pp-pro-banner">
1219 <div class="pp-container">
1220 <div class="pp-banner-header">
1221 <p class="heading-1">Level up your WordPress protection with</p>
1222 <p class="heading-2">Password Protected
1223 <img src="' . $image_url . 'crown.png" alt="">
1224 <span>Pro</span>
1225 </p>
1226 </div>
1227
1228 <div class="pp-banner-body">
1229 <div class="pp-cols">
1230 <div>
1231 <img src="' . $image_url . 'lock-2.png">
1232 Protect Specific Post Types
1233 <span class="pp-docs-link">
1234 <a target="_blank" href="https://passwordprotectedwp.com/documentation/post-and-page-protection/how-to-secure-all-posts-and-pages/?utm_source=plugin&utm_medium=pro_tab">Docs</a>
1235 </span>
1236 </div>
1237
1238 <div>
1239 <img src="' . $image_url . 'lock-2.png">
1240 Whitelist Specific User Role
1241 <span class="pp-docs-link">
1242 <a target="_blank" href="https://passwordprotectedwp.com/documentation/pro/whitelist-specific-user-role/?utm_source=plugin&utm_medium=pro_tab">Docs</a>
1243 </span>
1244 </div>
1245
1246 <div>
1247 <img src="' . $image_url . 'lock-2.png">
1248 Password Protect WP-Admin
1249 <span class="pp-docs-link">
1250 <a target="_blank" href="https://passwordprotectedwp.com/documentation/pro/password-protect-wp-admin/?utm_source=plugin&utm_medium=pro_tab">Docs</a>
1251 </span>
1252 </div>
1253
1254 <div>
1255 <img src="' . $image_url . 'lock-2.png">
1256 Password Attempt Activity Report
1257 <span class="pp-docs-link">
1258 <a target="_blank" href="https://passwordprotectedwp.com/documentation/logs/password-attempt-activity-report?utm_source=plugin&utm_medium=pro_tab">Docs</a>
1259 </span>
1260 </div>
1261
1262 <div>
1263 <img src="' . $image_url . 'lock-2.png">
1264 Specific Post/Page Protection
1265 <span class="pp-docs-link">
1266 <a target="_blank" href="https://passwordprotectedwp.com/documentation/post-and-page-protection/?utm_source=plugin&utm_medium=pro_tab">Docs</a>
1267 </span>
1268 </div>
1269
1270 <div>
1271 <img src="' . $image_url . 'lock-2.png">
1272 Certain Page/Posts Exclusions
1273 <span class="pp-docs-link">
1274 <a target="_blank" href="https://passwordprotectedwp.com/documentation/pro/exclude-pages-posts-and-post-types/?utm_source=plugin&utm_medium=pro_tab">Docs</a>
1275 </span>
1276 </div>
1277
1278 </div>
1279 <div class="pp-cols pp-cols-section-2">
1280 <div>
1281 <img src="' . $image_url . 'lock-2.png">
1282 Password Attempts Restriction
1283 <span class="pp-docs-link">
1284 <a target="_blank" href="https://passwordprotectedwp.com/documentation/pro/limit-password-attempts-and-lockdown-time/?utm_source=plugin&utm_medium=pro_tab">Docs</a>
1285 </span>
1286 </div>
1287
1288 <div>
1289 <img src="' . $image_url . 'lock-2.png">
1290 Password Expiration and Usage Limit
1291 <span class="pp-docs-link">
1292 <a target="_blank" href="https://passwordprotectedwp.com/documentation/pro/?utm_source=plugin&utm_medium=pro_tab">Docs</a>
1293 </span>
1294 </div>
1295
1296 <div>
1297 <img src="' . $image_url . 'lock-2.png">
1298 Bypass URL (Post, Page, Category, etc.)
1299 <span class="pp-docs-link">
1300 <a target="_blank" href="https://passwordprotectedwp.com/documentation/pro/bypass-password-protection-for-specific-urls/?utm_source=plugin&utm_medium=pro_tab">Docs</a>
1301 </span>
1302 </div>
1303
1304 <div>
1305 <img src="' . $image_url . 'lock-2.png">
1306 Activity Log For Each Password Attempt
1307 <span class="pp-docs-link">
1308 <a target="_blank" href="https://passwordprotectedwp.com/documentation/logs/password-activity-logs/?utm_source=plugin&utm_medium=pro_tab">Docs</a>
1309 </span>
1310 </div>
1311
1312 <div>
1313 <img src="' . $image_url . 'lock-2.png">
1314 Multiple Password Management
1315 <span class="pp-docs-link">
1316 <a target="_blank" href="https://passwordprotectedwp.com/documentation/pro/manage-multiple-websites/?utm_source=plugin&utm_medium=pro_tab">Docs</a>
1317 </span>
1318 </div>
1319
1320 </div>
1321
1322 <div class="pp-clearfix"></div>
1323 </div>
1324
1325 <div class="pp-banner-footer">
1326 <a target="_blank" href="https://passwordprotectedwp.com/pricing/?utm_source=plugin&utm_medium=pro_tab&utm_campaign=plugin">' . esc_html__( 'Get Password Protected Pro', 'password-protected' ) . '</a>
1327 </div>
1328 </div>
1329 </div>';
1330 }
1331
1332 public function dummy_content( $k ) {
1333
1334 echo '<div class="disabled-content click-to-display-popup">
1335 <div class="pp-wrap-content"></div>
1336 <div class="pp-pro-branding" style="margin-top: 10px" >';
1337 if ( isset( $k['sub-tab'] ) ) {
1338 switch ( $k['sub-tab'] ) {
1339 case 'password-protected-page-description':
1340 $url = add_query_arg(
1341 array(
1342 'utm_source' => 'plugin',
1343 'utm_medium' => 'pop_up',
1344 'utm_campaign' => 'plugin',
1345 'utm_content' => 'page_description'
1346 ),
1347 'https://passwordprotectedwp.com/pricing/'
1348 );
1349 echo '<div>
1350 <h2>Password Protected Outside Form description <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1351 <table class="form-table">
1352 <tr>
1353 <th><label for="">Text Above Form</label></th>
1354 <td>
1355 <textarea id="password_protected_text_below_form" name="password_protected_text_below_form" rows="4" cols="50" class="regular-text"></textarea>
1356 </td>
1357 </tr>
1358
1359 <tr>
1360 <th><label for="">Text Below Form</label></th>
1361 <td>
1362 <textarea id="password_protected_text_below_form" name="password_protected_text_below_form" rows="4" cols="50" class="regular-text"></textarea>
1363 </td>
1364 </tr>
1365 </table>
1366 </div>';
1367 break;
1368 }
1369 }
1370 if ( isset( $k['slug'] ) ) {
1371 switch ( $k['slug'] ) {
1372 case 'exclude-from-protection':
1373 $url = add_query_arg(
1374 array(
1375 'utm_source' => 'plugin',
1376 'utm_medium' => 'pop_up',
1377 'utm_campaign' => 'plugin',
1378 'utm_content' => 'exclude_protection'
1379 ),
1380 'https://passwordprotectedwp.com/pricing/'
1381 );
1382 echo '<div>
1383 <h2>Exclude From Password Protection <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1384 <table class="form-table">
1385 <tr>
1386 <th><label for="">Exclude Pages</label></th>
1387 <td>
1388 <input disabled placeholder="Select pages to exclude" type="text" class="regular-text" />
1389 </td>
1390 </tr>
1391
1392 <tr>
1393 <th><label for="">Exclude Posts</label></th>
1394 <td>
1395 <input disabled placeholder="Select posts to exclude" type="text" class="regular-text" />
1396 </td>
1397 </tr>
1398
1399 <tr>
1400 <th><label for="">Exclude post Types</label></th>
1401 <td>
1402 <input disabled placeholder="Select post types to exclude" type="text" class="regular-text" />
1403 </td>
1404 </tr>
1405 </table>
1406 </div>';
1407 break;
1408 case 'attempt-limitation':
1409 $url = add_query_arg(
1410 array(
1411 'utm_source' => 'plugin',
1412 'utm_medium' => 'pop_up',
1413 'utm_campaign' => 'plugin',
1414 'utm_content' => 'attempt_limitation'
1415 ),
1416 'https://passwordprotectedwp.com/pricing/'
1417 );
1418 echo '<div>
1419 <h2>Limit Password Attempts <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1420 <table class="form-table">
1421 <tr>
1422 <th><label for="">No of Attempts</label></th>
1423 <td>
1424 <input disabled placeholder="Limit Password Attempts" type="text" class="regular-text" />
1425 </td>
1426 </tr>
1427
1428 <tr>
1429 <th><label for="">Lockdown Time In Minutes: </label></th>
1430 <td>
1431 <input disabled placeholder="Lockdown Time" type="text" class="regular-text" />
1432 </td>
1433 </tr>
1434 </table>
1435 </div>';
1436 break;
1437 case 'bypass-url':
1438 $url = add_query_arg(
1439 array(
1440 'utm_source' => 'plugin',
1441 'utm_medium' => 'pop_up',
1442 'utm_campaign' => 'plugin',
1443 'utm_content' => 'bypass_url'
1444 ),
1445 'https://passwordprotectedwp.com/pricing/'
1446 );
1447 echo '<div>
1448 <h2>Bypass URL <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1449 <table class="form-table">
1450 <tr>
1451 <th>
1452 <label for="">Enable Bypass URL</label>
1453 </th>
1454 <td>
1455 <div class="pp-toggle-wrapper">
1456 <input disabled type="checkbox" >
1457 <label class="pp-toggle">
1458 <span class="pp-toggle-slider"></span>
1459 </label>
1460 </div>
1461 </td>
1462 </tr>
1463
1464 <tr>
1465 <th>
1466 <label for="">Set Bypass key</label>
1467 </th>
1468 <td>
1469 <input disabled type="text" class="regular-text">
1470 </td>
1471 </tr>
1472
1473 <tr>
1474 <th>
1475 <label for="">Redirect To</label>
1476 </th>
1477 <td>
1478 <input disabled type="text" class="regular-text">
1479 </td>
1480 </tr>
1481 </table>
1482 </div>';
1483 break;
1484 case 'manage_passwords':
1485 $url = add_query_arg(
1486 array(
1487 'utm_source' => 'plugin',
1488 'utm_medium' => 'pop_up',
1489 'utm_campaign' => 'plugin',
1490 'utm_content' => 'multiple_passwords'
1491 ),
1492 'https://passwordprotectedwp.com/pricing/'
1493 );
1494 echo '<div>
1495 <h2>Manage Passwords <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1496 <button disabled class="button button-secondary">Add New Password</button>
1497 <br><br>
1498
1499 <table class="wp-list-table widefat fixed striped table-view-list toplevel_page_password-protected">
1500 <thead>
1501 <tr>
1502 <th>Password</th>
1503 <th>Uses Remaining</th>
1504 <th>Expiry</th>
1505 <th>Status</th>
1506 <th>Actions</th>
1507 <th>Bypass URL</th>
1508 </tr>
1509 </thead>
1510 <tbody>
1511 <tr>
1512 <td colspan="6">
1513 Manage passwords are only available in Password Protected Pro version.
1514 </td>
1515 </tr>
1516 </tbody>
1517 <tfoot>
1518 <tr>
1519 <th>Password</th>
1520 <th>Uses Remaining</th>
1521 <th>Expiry</th>
1522 <th>Status</th>
1523 <th>Actions</th>
1524 <th>Bypass URL</th>
1525 </tr>
1526 </tfoot>
1527 </table>
1528 </div>';
1529 break;
1530 case 'activity_logs':
1531 $url = add_query_arg(
1532 array(
1533 'utm_source' => 'plugin',
1534 'utm_medium' => 'pop_up',
1535 'utm_campaign' => 'plugin',
1536 'utm_content' => 'activity_logs'
1537 ),
1538 'https://passwordprotectedwp.com/pricing/'
1539 );
1540 echo '<div>
1541 <h2>Activity Logs <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1542 <table class="wp-list-table widefat fixed striped table-view-list toplevel_page_password-protected">
1543 <thead>
1544 <tr>
1545 <th>IP</th>
1546 <th>Browser</th>
1547 <th>Status</th>
1548 <th>Password</th>
1549 <th>Date Time</th>
1550 </tr>
1551 </thead>
1552 <tbody>
1553 <tr>
1554 <td colspan="5">
1555 Activity logs are only available in Password Protected Pro version.
1556 </td>
1557 </tr>
1558 </tbody>
1559 <tfoot>
1560 <tr>
1561 <th>IP</th>
1562 <th>Browser</th>
1563 <th>Status</th>
1564 <th>Password</th>
1565 <th>Date Time</th>
1566 </tr>
1567 </tfoot>
1568 </table>
1569 </div>';
1570 break;
1571 case 'post-type-protection':
1572 $url = add_query_arg(
1573 array(
1574 'utm_source' => 'plugin',
1575 'utm_medium' => 'pop_up',
1576 'utm_campaign' => 'plugin',
1577 'utm_content' => 'post_protection'
1578 ),
1579 'https://passwordprotectedwp.com/pricing/'
1580 );
1581 echo '<div>
1582 <h2>Post type protection <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1583 <table class="form-table">
1584 <tr>
1585 <th>Post Type</th>
1586 <th>Global</th>
1587 <th>Individual</th>
1588 </tr>
1589
1590 <tr>
1591 <th>Post</th>
1592 <td><input disabled type="checkbox"></td>
1593 <td><input disabled type="checkbox"></td>
1594 </tr>
1595 <tr>
1596 <th>Page</th>
1597 <td><input disabled type="checkbox"></td>
1598 <td><input disabled type="checkbox"></td>
1599 </tr>
1600 </table>
1601 </div>';
1602 break;
1603 case 'taxonomy-protection':
1604 $url = add_query_arg(
1605 array(
1606 'utm_source' => 'plugin',
1607 'utm_medium' => 'pop_up',
1608 'utm_campaign' => 'plugin',
1609 'utm_content' => 'taxonomy_protection'
1610 ),
1611 'https://passwordprotectedwp.com/pricing/'
1612 );
1613 echo '<div>
1614 <h2>Category/Taxonomy protection <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1615
1616 <table class="form-table">
1617 <tr>
1618 <th>Category</th>
1619 <td><input disabled type="checkbox"></td>
1620 </tr>
1621 <tr>
1622 <th>Post_tag</th>
1623 <td><input disabled type="checkbox"></td>
1624 </tr>
1625 </table>
1626 </div>';
1627 break;
1628 case 'whitelist-user-role':
1629 $url = add_query_arg(
1630 array(
1631 'utm_source' => 'plugin',
1632 'utm_medium' => 'pop_up',
1633 'utm_campaign' => 'plugin',
1634 'utm_content' => 'whitelist_user_role'
1635 ),
1636 'https://passwordprotectedwp.com/pricing/'
1637 );
1638 echo '<div>
1639 <h2>White List User Roles <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1640 <table class="form-table">
1641 <tr>
1642 <th>Enable Whitelist User Roles</th>
1643 <td>
1644 <div class="pp-toggle-wrapper">
1645 <input disabled type="checkbox" >
1646 <label class="pp-toggle">
1647 <span class="pp-toggle-slider"></span>
1648 </label>
1649 </div>
1650 </td>
1651 </tr>
1652 <tr>
1653 <th>Whitelist User Roles</th>
1654 <td>
1655 <input disabled type="text" class="regular-text">
1656 </td>
1657 </tr>
1658 </table>
1659 <h2>WP Login Screen Redirect</h2>
1660 <table class="form-table">
1661 <tr>
1662 <th>Enable WP Login Screen Redirection</th>
1663 <td>
1664 <div class="pp-toggle-wrapper">
1665 <input disabled type="checkbox" >
1666 <label class="pp-toggle">
1667 <span class="pp-toggle-slider"></span>
1668 </label>
1669 </div>
1670 </td>
1671 </tr>
1672 <tr>
1673 <th>Add Text for Redirection Link</th>
1674 <td><textarea disabled class="regular-text"></textarea></td>
1675 </tr>
1676 </table>
1677 </div>';
1678 break;
1679 case 'wp-admin-protection':
1680 $url = add_query_arg(
1681 array(
1682 'utm_source' => 'plugin',
1683 'utm_medium' => 'pop_up',
1684 'utm_campaign' => 'plugin',
1685 'utm_content' => 'wpadmin_protection'
1686 ),
1687 'https://passwordprotectedwp.com/pricing/'
1688 );
1689 echo '<div>
1690 <h2>Enable Admin Protection <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1691 <table class="form-table">
1692 <tr>
1693 <th>Enable</th>
1694 <td><div class="pp-toggle-wrapper">
1695 <input disabled type="checkbox" >
1696 <label class="pp-toggle">
1697 <span class="pp-toggle-slider"></span>
1698 </label>
1699 </div></td>
1700 </tr>
1701 </table>
1702 <h2>Password</h2>
1703 <table class="form-table">
1704 <tr>
1705 <th>Password</th>
1706 <td>
1707 <input disabled type="text" class="regular-text" />
1708 <br><br>
1709 <input disabled type="text" class="regular-text" />
1710 </td>
1711 </tr>
1712 </table>
1713 <h2>Remember Me</h2>
1714 <table class="form-table">
1715 <tr>
1716 <th>Remember Me</th>
1717 <td><div class="pp-toggle-wrapper">
1718 <input disabled type="checkbox" >
1719 <label class="pp-toggle">
1720 <span class="pp-toggle-slider"></span>
1721 </label>
1722 </div></td>
1723 </tr>
1724 <tr>
1725 <th>Remember Me Many Days</th>
1726 <td>
1727 <input disabled type="text" class="regular-text" />
1728 </td>
1729 </tr>
1730 </table>
1731 <h2>Forgot Password</h2>
1732 <table class="form-table">
1733 <tr>
1734 <th>Forgot Password</th>
1735 <td><div class="pp-toggle-wrapper">
1736 <input disabled type="checkbox" >
1737 <label class="pp-toggle">
1738 <span class="pp-toggle-slider"></span>
1739 </label>
1740 </div></td>
1741 </tr>
1742 </table>
1743 </div>';
1744 break;
1745
1746 case 'logo-styles':
1747 $url = add_query_arg(
1748 array(
1749 'utm_source' => 'plugin',
1750 'utm_medium' => 'pop_up',
1751 'utm_campaign' => 'plugin',
1752 'utm_content' => 'logo_styles'
1753 ),
1754 'https://passwordprotectedwp.com/pricing/'
1755 );
1756
1757 $default_logo_url = admin_url( 'images/wordpress-logo.svg' );
1758
1759 echo '<div>
1760 <h2>Logo Styles <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1761
1762 <table class="form-table" role="presentation"><tbody><tr><th scope="row"><label for="logo">logo</label></th><td><div class="pp-media-wrapper">
1763 <input type="hidden" value="0" id="logo" name="password_protected_logo_styles[logo]">
1764 <div class="pp-media-preview"><img src="' . $default_logo_url . '" alt="' . $default_logo_url . '"></div>
1765 <button class="button pp-media-upload">Upload</button>
1766 <button class="button pp-media-remove">Remove</button>
1767 </div></td></tr><tr><th scope="row"><label for="logo_width">Logo Width</label></th><td><div class="range-slider-wrapper"><label for="logo_width" pp-customizer-placeholder="px"><strong>84px</strong></label><input pp-default-value="84" id="logo_width" class="regular-text range-slider-input" name="password_protected_logo_styles[logo_width]" min="30" max="400" step="1" value="84" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="84">Reset</button></div></td></tr><tr><th scope="row"><label for="logo_height">Logo Height</label></th><td><div class="range-slider-wrapper"><label for="logo_height" pp-customizer-placeholder="px"><strong>84px</strong></label><input pp-default-value="84" id="logo_height" class="regular-text range-slider-input" name="password_protected_logo_styles[logo_height]" min="30" max="400" step="1" value="84" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="84">Reset</button></div></td></tr><tr><th scope="row"><label for="redirect_url">Redirect URL</label></th><td><select id="redirect_url" name="password_protected_logo_styles[redirect_url]" class="regular-text">
1768 <option value="2" selected="selected">Sample Page</option>
1769 </select></td></tr><tr><th scope="row"><label for="disable_logo">Disable Logo</label></th><td><div class="pp-toggle-wrapper">
1770 <input type="checkbox" value="yes" id="disable_logo" name="password_protected_logo_styles[disable_logo]">
1771 <label class="pp-toggle" for="disable_logo">
1772 <span class="pp-toggle-slider"></span>
1773 </label>
1774 </div></td></tr></tbody></table>
1775 </div>';
1776 break;
1777 case 'label-styles':
1778 $url = add_query_arg(
1779 array(
1780 'utm_source' => 'plugin',
1781 'utm_medium' => 'pop_up',
1782 'utm_campaign' => 'plugin',
1783 'utm_content' => 'label_styles'
1784 ),
1785 'https://passwordprotectedwp.com/pricing/'
1786 );
1787
1788 echo '<div>
1789 <h2>Label Styles <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1790
1791 <table class="form-table" role="presentation"><tbody><tr><th scope="row"><label for="label">Label</label></th><td><input type="text" value="Password" id="label" name="password_protected_labels_styles[label]" class="regular-text"></td></tr><tr><th scope="row"><label for="font">Font</label></th><td><select id="font" name="password_protected_labels_styles[font]" class="regular-text">
1792 <option value="default" selected="selected">Default</option><option value="Abril Fatface">Abril Fatface</option><option value="Georgia">Georgia</option><option value="Helvetica">Helvetica</option><option value="Lato">Lato</option><option value="Lora">Lora</option><option value="Karla">Karla</option><option value="Josefin Sans">Josefin Sans</option><option value="Montserrat">Montserrat</option><option value="Open Sans">Open Sans</option><option value="Oswald">Oswald</option><option value="Overpass">Overpass</option><option value="Poppins">Poppins</option><option value="PT Sans">PT Sans</option><option value="Roboto">Roboto</option><option value="Fira Sans">Fira Sans</option><option value="Times New Roman">Times New Roman</option><option value="Nunito">Nunito</option><option value="Merriweather">Merriweather</option><option value="Rubik">Rubik</option><option value="Playfair Display">Playfair Display</option><option value="Spectral">Spectral</option>
1793 </select></td></tr><tr><th scope="row"><label for="font-size">Font Size</label></th><td><div class="range-slider-wrapper"><label for="font-size" pp-customizer-placeholder="px"><strong>14px</strong></label><input pp-default-value="14" id="font-size" class="regular-text range-slider-input" name="password_protected_labels_styles[font-size]" min="13" max="40" step="1" value="14" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="14">Reset</button></div></td></tr><tr><th scope="row"><label for="position">Position</label></th><td><div class="range-slider-wrapper"><label for="position" pp-customizer-placeholder="px"><strong>2px</strong></label><input pp-default-value="2" id="position" class="regular-text range-slider-input" name="password_protected_labels_styles[position]" min="0" max="20" step="1" value="2" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="2">Reset</button></div></td></tr><tr><th scope="row"><label for="color">Color</label></th><td><div class="wp-picker-container"><button type="button" class="button wp-color-result" aria-expanded="false" style="background-color: rgb(114, 119, 124);"><span class="wp-color-result-text">Select Color</span></button><span class="wp-picker-input-wrap hidden"><label><span class="screen-reader-text">Color value</span><input type="text" value="#72777c" id="color" name="password_protected_labels_styles[color]" class="regular-text pp-color-selector wp-color-picker"></label><input type="button" class="button button-small wp-picker-clear" value="Clear" aria-label="Clear color"></span><div class="wp-picker-holder"><div class="iris-picker iris-border" style="display: none; width: 255px; height: 202.125px; padding-bottom: 23.2209px;"><div class="iris-picker-inner"><div class="iris-square" style="width: 182.125px; height: 182.125px;"><a class="iris-square-value ui-draggable ui-draggable-handle" href="#" style="left: 106.24px; top: 92.8838px;"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz" style="background-image: -webkit-linear-gradient(left, rgb(255, 235, 235), rgb(255, 245, 235), rgb(255, 255, 235), rgb(245, 255, 235), rgb(235, 255, 235), rgb(235, 255, 245), rgb(235, 255, 255), rgb(235, 245, 255), rgb(235, 235, 255), rgb(245, 235, 255), rgb(255, 235, 255), rgb(255, 235, 245), rgb(255, 235, 235));"></div><div class="iris-square-inner iris-square-vert" style="background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgb(0, 0, 0));"></div></div><div class="iris-slider iris-strip" style="height: 205.346px; width: 28.2px; background-image: -webkit-linear-gradient(top, rgb(0, 61, 122), rgb(125, 125, 125));"><div class="iris-slider-offset ui-slider ui-corner-all ui-slider-vertical ui-widget ui-widget-content"><span tabindex="0" class="ui-slider-handle ui-corner-all ui-state-default" style="bottom: 8%;"></span></div></div></div><div class="iris-palette-container"><a class="iris-palette" tabindex="0" style="background-color: rgb(0, 0, 0); height: 19.5784px; width: 19.5784px; margin-left: 0px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(255, 255, 255); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 51, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 153, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(238, 238, 34); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(129, 215, 66); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(30, 115, 190); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(130, 36, 227); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a></div></div></div></div></td></tr></tbody></table>
1794
1795 </div>';
1796 break;
1797 case 'field-styles':
1798 $url = add_query_arg(
1799 array(
1800 'utm_source' => 'plugin',
1801 'utm_medium' => 'pop_up',
1802 'utm_campaign' => 'plugin',
1803 'utm_content' => 'field_styles'
1804 ),
1805 'https://passwordprotectedwp.com/pricing/'
1806 );
1807
1808 echo '<div>
1809 <h2>Field Styles <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1810
1811 <table class="form-table" role="presentation"><tbody><tr><th scope="row"><label for="bg-color">Background Color</label></th><td><div class="wp-picker-container"><button type="button" class="button wp-color-result" aria-expanded="false" style="background-color: rgb(251, 251, 251);"><span class="wp-color-result-text">Select Color</span></button><span class="wp-picker-input-wrap hidden"><label><span class="screen-reader-text">Color value</span><input type="text" value="#fbfbfb" id="bg-color" name="password_protected_fields_styles[bg-color]" class="regular-text pp-color-selector wp-color-picker"></label><input type="button" class="button button-small wp-picker-clear" value="Clear" aria-label="Clear color"></span><div class="wp-picker-holder"><div class="iris-picker iris-border" style="display: none; width: 255px; height: 202.125px; padding-bottom: 23.2209px;"><div class="iris-picker-inner"><div class="iris-square" style="width: 182.125px; height: 182.125px;"><a class="iris-square-value ui-draggable ui-draggable-handle" href="#" style="left: 0px; top: 3.6425px;"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz" style="background-image: -webkit-linear-gradient(left, rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255));"></div><div class="iris-square-inner iris-square-vert" style="background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgb(0, 0, 0));"></div></div><div class="iris-slider iris-strip" style="height: 205.346px; width: 28.2px; background-image: -webkit-linear-gradient(top, rgb(250, 0, 0), rgb(250, 250, 250));"><div class="iris-slider-offset ui-slider ui-corner-all ui-slider-vertical ui-widget ui-widget-content"><span tabindex="0" class="ui-slider-handle ui-corner-all ui-state-default" style="bottom: 0%;"></span></div></div></div><div class="iris-palette-container"><a class="iris-palette" tabindex="0" style="background-color: rgb(0, 0, 0); height: 19.5784px; width: 19.5784px; margin-left: 0px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(255, 255, 255); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 51, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 153, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(238, 238, 34); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(129, 215, 66); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(30, 115, 190); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(130, 36, 227); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a></div></div></div></div></td></tr><tr><th scope="row"><label for="border">Border</label></th><td><div class="range-slider-wrapper"><label for="border" pp-customizer-placeholder="px"><strong>1px</strong></label><input pp-default-value="1" id="border" class="regular-text range-slider-input" name="password_protected_fields_styles[border]" min="0" max="10" step="1" value="1" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="1">Reset</button></div></td></tr><tr><th scope="row"><label for="border-color">Border Color</label></th><td><div class="wp-picker-container"><button type="button" class="button wp-color-result" aria-expanded="false" style="background-color: rgb(221, 221, 221);"><span class="wp-color-result-text">Select Color</span></button><span class="wp-picker-input-wrap hidden"><label><span class="screen-reader-text">Color value</span><input type="text" value="#dddddd" id="border-color" name="password_protected_fields_styles[border-color]" class="regular-text pp-color-selector wp-color-picker"></label><input type="button" class="button button-small wp-picker-clear" value="Clear" aria-label="Clear color"></span><div class="wp-picker-holder"><div class="iris-picker iris-border" style="display: none; width: 255px; height: 202.125px; padding-bottom: 23.2209px;"><div class="iris-picker-inner"><div class="iris-square" style="width: 182.125px; height: 182.125px;"><a class="iris-square-value ui-draggable ui-draggable-handle" href="#" style="left: 0px; top: 23.6762px;"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz" style="background-image: -webkit-linear-gradient(left, rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255));"></div><div class="iris-square-inner iris-square-vert" style="background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgb(0, 0, 0));"></div></div><div class="iris-slider iris-strip" style="height: 205.346px; width: 28.2px; background-image: -webkit-linear-gradient(top, rgb(219, 0, 0), rgb(222, 222, 222));"><div class="iris-slider-offset ui-slider ui-corner-all ui-slider-vertical ui-widget ui-widget-content"><span tabindex="0" class="ui-slider-handle ui-corner-all ui-state-default" style="bottom: 0%;"></span></div></div></div><div class="iris-palette-container"><a class="iris-palette" tabindex="0" style="background-color: rgb(0, 0, 0); height: 19.5784px; width: 19.5784px; margin-left: 0px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(255, 255, 255); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 51, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 153, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(238, 238, 34); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(129, 215, 66); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(30, 115, 190); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(130, 36, 227); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a></div></div></div></div></td></tr><tr><th scope="row"><label for="margin-bottom">Margin Bottom</label></th><td><div class="range-slider-wrapper"><label for="margin-bottom" pp-customizer-placeholder="px"><strong>16px</strong></label><input pp-default-value="16" id="margin-bottom" class="regular-text range-slider-input" name="password_protected_fields_styles[margin-bottom]" min="1" max="60" step="1" value="16" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="16">Reset</button></div></td></tr><tr><th scope="row"><label for="padding">Padding</label></th><td><div class="range-slider-wrapper"><label for="padding" pp-customizer-placeholder="px"><strong>0px</strong></label><input pp-default-value="0" id="padding" class="regular-text range-slider-input" name="password_protected_fields_styles[padding]" min="0" max="40" step="1" value="0" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="0">Reset</button></div></td></tr><tr><th scope="row"><label for="padding-top">Padding Top</label></th><td><div class="range-slider-wrapper"><label for="padding-top" pp-customizer-placeholder="px"><strong>3px</strong></label><input pp-default-value="3" id="padding-top" class="regular-text range-slider-input" name="password_protected_fields_styles[padding-top]" min="0" max="40" step="1" value="3" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="3">Reset</button></div></td></tr><tr><th scope="row"><label for="padding-bottom">Padding Bottom</label></th><td><div class="range-slider-wrapper"><label for="padding-bottom" pp-customizer-placeholder="px"><strong>3px</strong></label><input pp-default-value="3" id="padding-bottom" class="regular-text range-slider-input" name="password_protected_fields_styles[padding-bottom]" min="0" max="40" step="1" value="3" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="3">Reset</button></div></td></tr><tr><th scope="row"><label for="border-radius">Border Radius</label></th><td><div class="range-slider-wrapper"><label for="border-radius" pp-customizer-placeholder="px"><strong>0px</strong></label><input pp-default-value="0" id="border-radius" class="regular-text range-slider-input" name="password_protected_fields_styles[border-radius]" min="0" max="60" step="1" value="0" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="0">Reset</button></div></td></tr><tr><th scope="row"><label for="shadow">Shadow</label></th><td><div class="range-slider-wrapper"><label for="shadow" pp-customizer-placeholder="px"><strong>0px</strong></label><input pp-default-value="0" id="shadow" class="regular-text range-slider-input" name="password_protected_fields_styles[shadow]" min="0" max="30" step="1" value="0" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="0">Reset</button></div></td></tr><tr><th scope="row"><label for="shadow-opacity">Shadow Opacity</label></th><td><div class="range-slider-wrapper"><label for="shadow-opacity" pp-customizer-placeholder="%"><strong>7%</strong></label><input pp-default-value="7" id="shadow-opacity" class="regular-text range-slider-input" name="password_protected_fields_styles[shadow-opacity]" min="0" max="100" step="1" value="7" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="7">Reset</button></div></td></tr><tr><th scope="row"><label for="shadow-inset">Shadow Inset</label></th><td><div class="pp-toggle-wrapper">
1812 <input type="checkbox" value="yes" id="shadow-inset" name="password_protected_fields_styles[shadow-inset]">
1813 <label class="pp-toggle" for="shadow-inset">
1814 <span class="pp-toggle-slider"></span>
1815 </label>
1816 </div></td></tr></tbody></table>
1817
1818 <h2>Text Styles</h2>
1819
1820 <table class="form-table" role="presentation"><tbody><tr><th scope="row"><label for="font">Font</label></th><td><select id="font" name="password_protected_fields_styles[font]" class="regular-text">
1821 <option value="default" selected="selected">Default</option><option value="Abril Fatface">Abril Fatface</option><option value="Georgia">Georgia</option><option value="Helvetica">Helvetica</option><option value="Lato">Lato</option><option value="Lora">Lora</option><option value="Karla">Karla</option><option value="Josefin Sans">Josefin Sans</option><option value="Montserrat">Montserrat</option><option value="Open Sans">Open Sans</option><option value="Oswald">Oswald</option><option value="Overpass">Overpass</option><option value="Poppins">Poppins</option><option value="PT Sans">PT Sans</option><option value="Roboto">Roboto</option><option value="Fira Sans">Fira Sans</option><option value="Times New Roman">Times New Roman</option><option value="Nunito">Nunito</option><option value="Merriweather">Merriweather</option><option value="Rubik">Rubik</option><option value="Playfair Display">Playfair Display</option><option value="Spectral">Spectral</option>
1822 </select></td></tr><tr><th scope="row"><label for="font-size">Font Size</label></th><td><div class="range-slider-wrapper"><label for="font-size" pp-customizer-placeholder="px"><strong>24px</strong></label><input pp-default-value="24" id="font-size" class="regular-text range-slider-input" name="password_protected_fields_styles[font-size]" min="13" max="40" step="1" value="24" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="24">Reset</button></div></td></tr><tr><th scope="row"><label for="text-color">Text Color</label></th><td><div class="wp-picker-container"><button type="button" class="button wp-color-result" aria-expanded="false" style="background-color: rgb(130, 36, 227);"><span class="wp-color-result-text">Select Color</span></button><span class="wp-picker-input-wrap hidden"><label><span class="screen-reader-text">Color value</span><input type="text" value="#8224e3" id="text-color" name="password_protected_fields_styles[text-color]" class="regular-text pp-color-selector wp-color-picker"></label><input type="button" class="button button-small wp-picker-clear" value="Clear" aria-label="Clear color"></span><div class="wp-picker-holder"><div class="iris-picker iris-border" style="display: none; width: 255px; height: 202.125px; padding-bottom: 23.2209px;"><div class="iris-picker-inner"><div class="iris-square" style="width: 182.125px; height: 182.125px;"><a class="iris-square-value ui-draggable ui-draggable-handle" href="#" style="left: 136.594px; top: 20.0337px;"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz" style="background-image: -webkit-linear-gradient(left, rgb(255, 41, 41), rgb(255, 148, 41), rgb(255, 255, 41), rgb(148, 255, 41), rgb(41, 255, 41), rgb(41, 255, 148), rgb(41, 255, 255), rgb(41, 148, 255), rgb(41, 41, 255), rgb(148, 41, 255), rgb(255, 41, 255), rgb(255, 41, 148), rgb(255, 41, 41));"></div><div class="iris-square-inner iris-square-vert" style="background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgb(0, 0, 0));"></div></div><div class="iris-slider iris-strip" style="height: 205.346px; width: 28.2px; background-image: -webkit-linear-gradient(top, rgb(112, 0, 224), rgb(227, 227, 227));"><div class="iris-slider-offset ui-slider ui-corner-all ui-slider-vertical ui-widget ui-widget-content"><span tabindex="0" class="ui-slider-handle ui-corner-all ui-state-default" style="bottom: 84%;"></span></div></div></div><div class="iris-palette-container"><a class="iris-palette" tabindex="0" style="background-color: rgb(0, 0, 0); height: 19.5784px; width: 19.5784px; margin-left: 0px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(255, 255, 255); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 51, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 153, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(238, 238, 34); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(129, 215, 66); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(30, 115, 190); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(130, 36, 227); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a></div></div></div></div></td></tr></tbody></table>
1823 </div>';
1824 break;
1825 case 'button-styles':
1826 $url = add_query_arg(
1827 array(
1828 'utm_source' => 'plugin',
1829 'utm_medium' => 'pop_up',
1830 'utm_campaign' => 'plugin',
1831 'utm_content' => 'button_styles'
1832 ),
1833 'https://passwordprotectedwp.com/pricing/'
1834 );
1835
1836 echo '<div>
1837 <h2>Button Styles <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1838
1839 <table class="form-table" role="presentation"><tbody><tr><th scope="row"><label for="bg-color">Background Color</label></th><td><div class="wp-picker-container"><button type="button" class="button wp-color-result" aria-expanded="false" style="background-color: rgb(0, 133, 186);"><span class="wp-color-result-text">Select Color</span></button><span class="wp-picker-input-wrap hidden"><label><span class="screen-reader-text">Color value</span><input type="text" value="#0085ba" id="bg-color" name="password_protected_button_styles[bg-color]" class="regular-text pp-color-selector wp-color-picker"></label><input type="button" class="button button-small wp-picker-clear" value="Clear" aria-label="Clear color"></span><div class="wp-picker-holder"><div class="iris-picker iris-border" style="display: none; width: 255px; height: 202.125px; padding-bottom: 23.2209px;"><div class="iris-picker-inner"><div class="iris-square" style="width: 182.125px; height: 182.125px;"><a class="iris-square-value ui-draggable ui-draggable-handle" href="#" style="left: 99.6628px; top: 49.1737px;"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz" style="background-image: -webkit-linear-gradient(left, rgb(255, 0, 0), rgb(255, 128, 0), rgb(255, 255, 0), rgb(128, 255, 0), rgb(0, 255, 0), rgb(0, 255, 128), rgb(0, 255, 255), rgb(0, 128, 255), rgb(0, 0, 255), rgb(128, 0, 255), rgb(255, 0, 255), rgb(255, 0, 128), rgb(255, 0, 0));"></div><div class="iris-square-inner iris-square-vert" style="background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgb(0, 0, 0));"></div></div><div class="iris-slider iris-strip" style="height: 205.346px; width: 28.2px; background-image: -webkit-linear-gradient(top, rgb(0, 132, 184), rgb(186, 186, 186));"><div class="iris-slider-offset ui-slider ui-corner-all ui-slider-vertical ui-widget ui-widget-content"><span tabindex="0" class="ui-slider-handle ui-corner-all ui-state-default" style="bottom: 100%;"></span></div></div></div><div class="iris-palette-container"><a class="iris-palette" tabindex="0" style="background-color: rgb(0, 0, 0); height: 19.5784px; width: 19.5784px; margin-left: 0px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(255, 255, 255); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 51, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 153, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(238, 238, 34); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(129, 215, 66); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(30, 115, 190); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(130, 36, 227); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a></div></div></div></div></td></tr><tr><th scope="row"><label for="border">Border</label></th><td><div class="range-slider-wrapper"><label for="border" pp-customizer-placeholder="px"><strong>1px</strong></label><input pp-default-value="1" id="border" class="regular-text range-slider-input" name="password_protected_button_styles[border]" min="0" max="10" step="1" value="1" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="1">Reset</button></div></td></tr><tr><th scope="row"><label for="border-color">Border Color</label></th><td><div class="wp-picker-container"><button type="button" class="button wp-color-result" aria-expanded="false" style="background-color: rgb(0, 115, 170);"><span class="wp-color-result-text">Select Color</span></button><span class="wp-picker-input-wrap hidden"><label><span class="screen-reader-text">Color value</span><input type="text" value="#0073aa" id="border-color" name="password_protected_button_styles[border-color]" class="regular-text pp-color-selector wp-color-picker"></label><input type="button" class="button button-small wp-picker-clear" value="Clear" aria-label="Clear color"></span><div class="wp-picker-holder"><div class="iris-picker iris-border" style="display: none; width: 255px; height: 202.125px; padding-bottom: 23.2209px;"><div class="iris-picker-inner"><div class="iris-square" style="width: 182.125px; height: 182.125px;"><a class="iris-square-value ui-draggable ui-draggable-handle" href="#" style="left: 100.675px; top: 60.1012px;"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz" style="background-image: -webkit-linear-gradient(left, rgb(255, 0, 0), rgb(255, 128, 0), rgb(255, 255, 0), rgb(128, 255, 0), rgb(0, 255, 0), rgb(0, 255, 128), rgb(0, 255, 255), rgb(0, 128, 255), rgb(0, 0, 255), rgb(128, 0, 255), rgb(255, 0, 255), rgb(255, 0, 128), rgb(255, 0, 0));"></div><div class="iris-square-inner iris-square-vert" style="background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgb(0, 0, 0));"></div></div><div class="iris-slider iris-strip" style="height: 205.346px; width: 28.2px; background-image: -webkit-linear-gradient(top, rgb(0, 115, 168), rgb(171, 171, 171));"><div class="iris-slider-offset ui-slider ui-corner-all ui-slider-vertical ui-widget ui-widget-content"><span tabindex="0" class="ui-slider-handle ui-corner-all ui-state-default" style="bottom: 100%;"></span></div></div></div><div class="iris-palette-container"><a class="iris-palette" tabindex="0" style="background-color: rgb(0, 0, 0); height: 19.5784px; width: 19.5784px; margin-left: 0px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(255, 255, 255); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 51, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 153, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(238, 238, 34); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(129, 215, 66); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(30, 115, 190); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(130, 36, 227); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a></div></div></div></div></td></tr><tr><th scope="row"><label for="padding">Padding</label></th><td><div class="range-slider-wrapper"><label for="padding" pp-customizer-placeholder="px"><strong>12px</strong></label><input pp-default-value="12" id="padding" class="regular-text range-slider-input" name="password_protected_button_styles[padding]" min="0" max="60" step="1" value="12" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="12">Reset</button></div></td></tr><tr><th scope="row"><label for="padding-top">Padding Top</label></th><td><div class="range-slider-wrapper"><label for="padding-top" pp-customizer-placeholder="px"><strong>4px</strong></label><input pp-default-value="4" id="padding-top" class="regular-text range-slider-input" name="password_protected_button_styles[padding-top]" min="1" max="20" step="1" value="4" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="4">Reset</button></div></td></tr><tr><th scope="row"><label for="padding-bottom">Padding Bottom</label></th><td><div class="range-slider-wrapper"><label for="padding-bottom" pp-customizer-placeholder="px"><strong>4px</strong></label><input pp-default-value="4" id="padding-bottom" class="regular-text range-slider-input" name="password_protected_button_styles[padding-bottom]" min="1" max="20" step="1" value="4" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="4">Reset</button></div></td></tr><tr><th scope="row"><label for="border-radius">Border Radius</label></th><td><div class="range-slider-wrapper"><label for="border-radius" pp-customizer-placeholder="px"><strong>3px</strong></label><input pp-default-value="3" id="border-radius" class="regular-text range-slider-input" name="password_protected_button_styles[border-radius]" min="0" max="60" step="1" value="3" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="3">Reset</button></div></td></tr><tr><th scope="row"><label for="shadow">Shadow</label></th><td><div class="range-slider-wrapper"><label for="shadow" pp-customizer-placeholder="px"><strong>0px</strong></label><input pp-default-value="0" id="shadow" class="regular-text range-slider-input" name="password_protected_button_styles[shadow]" min="0" max="30" step="1" value="0" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="0">Reset</button></div></td></tr><tr><th scope="row"><label for="shadow-opacity">Shadow Opacity</label></th><td><div class="range-slider-wrapper"><label for="shadow-opacity" pp-customizer-placeholder="%"><strong>0%</strong></label><input pp-default-value="0" id="shadow-opacity" class="regular-text range-slider-input" name="password_protected_button_styles[shadow-opacity]" min="0" max="100" step="1" value="0" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="0">Reset</button></div></td></tr></tbody></table>
1840 <h2>Text Styles</h2>
1841 <table class="form-table" role="presentation"><tbody><tr><th scope="row"><label for="font">Font</label></th><td><select id="font" name="password_protected_button_styles[font]" class="regular-text">
1842 <option value="default" selected="selected">Default</option><option value="Abril Fatface">Abril Fatface</option><option value="Georgia">Georgia</option><option value="Helvetica">Helvetica</option><option value="Lato">Lato</option><option value="Lora">Lora</option><option value="Karla">Karla</option><option value="Josefin Sans">Josefin Sans</option><option value="Montserrat">Montserrat</option><option value="Open Sans">Open Sans</option><option value="Oswald">Oswald</option><option value="Overpass">Overpass</option><option value="Poppins">Poppins</option><option value="PT Sans">PT Sans</option><option value="Roboto">Roboto</option><option value="Fira Sans">Fira Sans</option><option value="Times New Roman">Times New Roman</option><option value="Nunito">Nunito</option><option value="Merriweather">Merriweather</option><option value="Rubik">Rubik</option><option value="Playfair Display">Playfair Display</option><option value="Spectral">Spectral</option>
1843 </select></td></tr><tr><th scope="row"><label for="font-size">Font Size</label></th><td><div class="range-slider-wrapper"><label for="font-size" pp-customizer-placeholder="px"><strong>13px</strong></label><input pp-default-value="13" id="font-size" class="regular-text range-slider-input" name="password_protected_button_styles[font-size]" min="13" max="40" step="1" value="13" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="13">Reset</button></div></td></tr><tr><th scope="row"><label for="text-color">Text Color</label></th><td><div class="wp-picker-container"><button type="button" class="button wp-color-result" aria-expanded="false" style="background-color: rgb(5, 5, 5);"><span class="wp-color-result-text">Select Color</span></button><span class="wp-picker-input-wrap hidden"><label><span class="screen-reader-text">Color value</span><input type="text" value="#050505" id="text-color" name="password_protected_button_styles[text-color]" class="regular-text pp-color-selector wp-color-picker"></label><input type="button" class="button button-small wp-picker-clear" value="Clear" aria-label="Clear color"></span><div class="wp-picker-holder"><div class="iris-picker iris-border" style="display: none; width: 255px; height: 202.125px; padding-bottom: 23.2209px;"><div class="iris-picker-inner"><div class="iris-square" style="width: 182.125px; height: 182.125px;"><a class="iris-square-value ui-draggable ui-draggable-handle" href="#" style="left: 0px; top: 178.482px;"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz" style="background-image: -webkit-linear-gradient(left, rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255));"></div><div class="iris-square-inner iris-square-vert" style="background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgb(0, 0, 0));"></div></div><div class="iris-slider iris-strip" style="height: 205.346px; width: 28.2px; background-image: -webkit-linear-gradient(top, rgb(5, 0, 0), rgb(5, 5, 5));"><div class="iris-slider-offset ui-slider ui-corner-all ui-slider-vertical ui-widget ui-widget-content"><span tabindex="0" class="ui-slider-handle ui-corner-all ui-state-default" style="bottom: 0%;"></span></div></div></div><div class="iris-palette-container"><a class="iris-palette" tabindex="0" style="background-color: rgb(0, 0, 0); height: 19.5784px; width: 19.5784px; margin-left: 0px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(255, 255, 255); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 51, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 153, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(238, 238, 34); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(129, 215, 66); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(30, 115, 190); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(130, 36, 227); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a></div></div></div></div></td></tr></tbody></table>
1844
1845 </div>';
1846 break;
1847 case 'remember-me-styles':
1848 $url = add_query_arg(
1849 array(
1850 'utm_source' => 'plugin',
1851 'utm_medium' => 'pop_up',
1852 'utm_campaign' => 'plugin',
1853 'utm_content' => 'remember_me_styles'
1854 ),
1855 'https://passwordprotectedwp.com/pricing/'
1856 );
1857
1858 echo '<div>
1859 <h2>Checkbox Styles <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1860 <table class="form-table" role="presentation"><tbody><tr><th scope="row"><label for="size">Size</label></th><td><div class="range-slider-wrapper"><label for="size" pp-customizer-placeholder="px"><strong>16px</strong></label><input pp-default-value="16" id="size" class="regular-text range-slider-input" name="password_protected_rememberme_styles[size]" min="16" max="20" step="1" value="16" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="16">Reset</button></div></td></tr><tr><th scope="row"><label for="bg-color">Background Color</label></th><td><div class="wp-picker-container"><button type="button" class="button wp-color-result" aria-expanded="false" style="background-color: rgb(251, 251, 251);"><span class="wp-color-result-text">Select Color</span></button><span class="wp-picker-input-wrap hidden"><label><span class="screen-reader-text">Color value</span><input type="text" value="#fbfbfb" id="bg-color" name="password_protected_rememberme_styles[bg-color]" class="regular-text pp-color-selector wp-color-picker"></label><input type="button" class="button button-small wp-picker-clear" value="Clear" aria-label="Clear color"></span><div class="wp-picker-holder"><div class="iris-picker iris-border" style="display: none; width: 255px; height: 202.125px; padding-bottom: 23.2209px;"><div class="iris-picker-inner"><div class="iris-square" style="width: 182.125px; height: 182.125px;"><a class="iris-square-value ui-draggable ui-draggable-handle" href="#" style="left: 0px; top: 3.6425px;"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz" style="background-image: -webkit-linear-gradient(left, rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255));"></div><div class="iris-square-inner iris-square-vert" style="background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgb(0, 0, 0));"></div></div><div class="iris-slider iris-strip" style="height: 205.346px; width: 28.2px; background-image: -webkit-linear-gradient(top, rgb(250, 0, 0), rgb(250, 250, 250));"><div class="iris-slider-offset ui-slider ui-corner-all ui-slider-vertical ui-widget ui-widget-content"><span tabindex="0" class="ui-slider-handle ui-corner-all ui-state-default" style="bottom: 0%;"></span></div></div></div><div class="iris-palette-container"><a class="iris-palette" tabindex="0" style="background-color: rgb(0, 0, 0); height: 19.5784px; width: 19.5784px; margin-left: 0px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(255, 255, 255); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 51, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 153, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(238, 238, 34); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(129, 215, 66); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(30, 115, 190); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(130, 36, 227); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a></div></div></div></div></td></tr><tr><th scope="row"><label for="border">Border</label></th><td><div class="range-slider-wrapper"><label for="border" pp-customizer-placeholder="px"><strong>0px</strong></label><input pp-default-value="0" id="border" class="regular-text range-slider-input" name="password_protected_rememberme_styles[border]" min="0" max="3" step="1" value="0" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="0">Reset</button></div></td></tr><tr><th scope="row"><label for="border-color">Border Color</label></th><td><div class="wp-picker-container"><button type="button" class="button wp-color-result" aria-expanded="false" style="background-color: rgb(180, 185, 190);"><span class="wp-color-result-text">Select Color</span></button><span class="wp-picker-input-wrap hidden"><label><span class="screen-reader-text">Color value</span><input type="text" value="#b4b9be" id="border-color" name="password_protected_rememberme_styles[border-color]" class="regular-text pp-color-selector wp-color-picker"></label><input type="button" class="button button-small wp-picker-clear" value="Clear" aria-label="Clear color"></span><div class="wp-picker-holder"><div class="iris-picker iris-border" style="display: none; width: 255px; height: 202.125px; padding-bottom: 23.2209px;"><div class="iris-picker-inner"><div class="iris-square" style="width: 182.125px; height: 182.125px;"><a class="iris-square-value ui-draggable ui-draggable-handle" href="#" style="left: 106.24px; top: 45.5312px;"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz" style="background-image: -webkit-linear-gradient(left, rgb(255, 240, 240), rgb(255, 247, 240), rgb(255, 255, 240), rgb(247, 255, 240), rgb(240, 255, 240), rgb(240, 255, 247), rgb(240, 255, 255), rgb(240, 247, 255), rgb(240, 240, 255), rgb(247, 240, 255), rgb(255, 240, 255), rgb(255, 240, 247), rgb(255, 240, 240));"></div><div class="iris-square-inner iris-square-vert" style="background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgb(0, 0, 0));"></div></div><div class="iris-slider iris-strip" style="height: 205.346px; width: 28.2px; background-image: -webkit-linear-gradient(top, rgb(0, 94, 189), rgb(191, 191, 191));"><div class="iris-slider-offset ui-slider ui-corner-all ui-slider-vertical ui-widget ui-widget-content"><span tabindex="0" class="ui-slider-handle ui-corner-all ui-state-default" style="bottom: 5%;"></span></div></div></div><div class="iris-palette-container"><a class="iris-palette" tabindex="0" style="background-color: rgb(0, 0, 0); height: 19.5784px; width: 19.5784px; margin-left: 0px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(255, 255, 255); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 51, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 153, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(238, 238, 34); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(129, 215, 66); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(30, 115, 190); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(130, 36, 227); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a></div></div></div></div></td></tr><tr><th scope="row"><label for="border-radius">Border Radius</label></th><td><div class="range-slider-wrapper"><label for="border-radius" pp-customizer-placeholder="px"><strong>0px</strong></label><input pp-default-value="0" id="border-radius" class="regular-text range-slider-input" name="password_protected_rememberme_styles[border-radius]" min="0" max="30" step="1" value="0" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="0">Reset</button></div></td></tr></tbody></table>
1861
1862 <h2>Label Styles</h2>
1863 <table class="form-table" role="presentation"><tbody><tr><th scope="row"><label for="font">Font</label></th><td><select id="font" name="password_protected_rememberme_styles[font]" class="regular-text">
1864 <option value="default" selected="selected">Default</option><option value="Abril Fatface">Abril Fatface</option><option value="Georgia">Georgia</option><option value="Helvetica">Helvetica</option><option value="Lato">Lato</option><option value="Lora">Lora</option><option value="Karla">Karla</option><option value="Josefin Sans">Josefin Sans</option><option value="Montserrat">Montserrat</option><option value="Open Sans">Open Sans</option><option value="Oswald">Oswald</option><option value="Overpass">Overpass</option><option value="Poppins">Poppins</option><option value="PT Sans">PT Sans</option><option value="Roboto">Roboto</option><option value="Fira Sans">Fira Sans</option><option value="Times New Roman">Times New Roman</option><option value="Nunito">Nunito</option><option value="Merriweather">Merriweather</option><option value="Rubik">Rubik</option><option value="Playfair Display">Playfair Display</option><option value="Spectral">Spectral</option>
1865 </select></td></tr><tr><th scope="row"><label for="font-size">Font Size</label></th><td><div class="range-slider-wrapper"><label for="font-size" pp-customizer-placeholder="px"><strong>12px</strong></label><input pp-default-value="12" id="font-size" class="regular-text range-slider-input" name="password_protected_rememberme_styles[font-size]" min="8" max="20" step="1" value="12" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="12">Reset</button></div></td></tr><tr><th scope="row"><label for="position">Position</label></th><td><div class="range-slider-wrapper"><label for="position" pp-customizer-placeholder="px"><strong>5px</strong></label><input pp-default-value="5" id="position" class="regular-text range-slider-input" name="password_protected_rememberme_styles[position]" min="0" max="20" step="1" value="5" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="5">Reset</button></div></td></tr><tr><th scope="row"><label for="color">Color</label></th><td><div class="wp-picker-container"><button type="button" class="button wp-color-result" aria-expanded="false" style="background-color: rgb(114, 119, 124);"><span class="wp-color-result-text">Select Color</span></button><span class="wp-picker-input-wrap hidden"><label><span class="screen-reader-text">Color value</span><input type="text" value="#72777c" id="color" name="password_protected_rememberme_styles[color]" class="regular-text pp-color-selector wp-color-picker"></label><input type="button" class="button button-small wp-picker-clear" value="Clear" aria-label="Clear color"></span><div class="wp-picker-holder"><div class="iris-picker iris-border" style="display: none; width: 255px; height: 202.125px; padding-bottom: 23.2209px;"><div class="iris-picker-inner"><div class="iris-square" style="width: 182.125px; height: 182.125px;"><a class="iris-square-value ui-draggable ui-draggable-handle" href="#" style="left: 106.24px; top: 92.8838px;"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz" style="background-image: -webkit-linear-gradient(left, rgb(255, 235, 235), rgb(255, 245, 235), rgb(255, 255, 235), rgb(245, 255, 235), rgb(235, 255, 235), rgb(235, 255, 245), rgb(235, 255, 255), rgb(235, 245, 255), rgb(235, 235, 255), rgb(245, 235, 255), rgb(255, 235, 255), rgb(255, 235, 245), rgb(255, 235, 235));"></div><div class="iris-square-inner iris-square-vert" style="background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgb(0, 0, 0));"></div></div><div class="iris-slider iris-strip" style="height: 205.346px; width: 28.2px; background-image: -webkit-linear-gradient(top, rgb(0, 61, 122), rgb(125, 125, 125));"><div class="iris-slider-offset ui-slider ui-corner-all ui-slider-vertical ui-widget ui-widget-content"><span tabindex="0" class="ui-slider-handle ui-corner-all ui-state-default" style="bottom: 8%;"></span></div></div></div><div class="iris-palette-container"><a class="iris-palette" tabindex="0" style="background-color: rgb(0, 0, 0); height: 19.5784px; width: 19.5784px; margin-left: 0px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(255, 255, 255); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 51, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 153, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(238, 238, 34); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(129, 215, 66); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(30, 115, 190); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(130, 36, 227); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a></div></div></div></div></td></tr></tbody></table>
1866
1867 </div>';
1868 break;
1869 case 'form-background':
1870 $url = add_query_arg(
1871 array(
1872 'utm_source' => 'plugin',
1873 'utm_medium' => 'pop_up',
1874 'utm_campaign' => 'plugin',
1875 'utm_content' => 'form_background'
1876 ),
1877 'https://passwordprotectedwp.com/pricing/'
1878 );
1879
1880 echo '<div>
1881 <h2>Form Background <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1882
1883 <table class="form-table" role="presentation"><tbody><tr><th scope="row"><label for="bg-color">Background Color</label></th><td><div class="wp-picker-container"><button type="button" class="button wp-color-result" aria-expanded="false" style="background-color: rgb(255, 255, 255);"><span class="wp-color-result-text">Select Color</span></button><span class="wp-picker-input-wrap hidden"><label><span class="screen-reader-text">Color value</span><input type="text" value="#ffffff" id="bg-color" name="password_protected_form_bg_styles[bg-color]" class="regular-text pp-color-selector wp-color-picker"></label><input type="button" class="button button-small wp-picker-clear" value="Clear" aria-label="Clear color"></span><div class="wp-picker-holder"><div class="iris-picker iris-border" style="display: none; width: 255px; height: 202.125px; padding-bottom: 23.2209px;"><div class="iris-picker-inner"><div class="iris-square" style="width: 182.125px; height: 182.125px;"><a class="iris-square-value ui-draggable ui-draggable-handle" href="#" style="left: 0px; top: 0px;"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz" style="background-image: -webkit-linear-gradient(left, rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255));"></div><div class="iris-square-inner iris-square-vert" style="background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgb(0, 0, 0));"></div></div><div class="iris-slider iris-strip" style="height: 205.346px; width: 28.2px; background-image: -webkit-linear-gradient(top, rgb(255, 0, 0), rgb(255, 255, 255));"><div class="iris-slider-offset ui-slider ui-corner-all ui-slider-vertical ui-widget ui-widget-content"><span tabindex="0" class="ui-slider-handle ui-corner-all ui-state-default" style="bottom: 0%;"></span></div></div></div><div class="iris-palette-container"><a class="iris-palette" tabindex="0" style="background-color: rgb(0, 0, 0); height: 19.5784px; width: 19.5784px; margin-left: 0px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(255, 255, 255); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 51, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 153, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(238, 238, 34); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(129, 215, 66); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(30, 115, 190); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(130, 36, 227); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a></div></div></div></div></td></tr><tr><th scope="row"><label for="border-radius">Border Radius</label></th><td><div class="range-slider-wrapper"><label for="border-radius" pp-customizer-placeholder="px"><strong>0px</strong></label><input pp-default-value="0" id="border-radius" class="regular-text range-slider-input" name="password_protected_form_bg_styles[border-radius]" min="0" max="50" step="1" value="0" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="0">Reset</button></div></td></tr><tr><th scope="row"><label for="shadow">Shadow</label></th><td><div class="range-slider-wrapper"><label for="shadow" pp-customizer-placeholder="px"><strong>3px</strong></label><input pp-default-value="3" id="shadow" class="regular-text range-slider-input" name="password_protected_form_bg_styles[shadow]" min="0" max="70" step="1" value="3" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="3">Reset</button></div></td></tr><tr><th scope="row"><label for="shadow-opacity">Shadow Opacity</label></th><td><div class="range-slider-wrapper"><label for="shadow-opacity" pp-customizer-placeholder="%"><strong>13%</strong></label><input pp-default-value="13" id="shadow-opacity" class="regular-text range-slider-input" name="password_protected_form_bg_styles[shadow-opacity]" min="0" max="100" step="1" value="13" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="13">Reset</button></div></td></tr><tr><th scope="row"><label for="side-padding">Side Padding</label></th><td><div class="range-slider-wrapper"><label for="side-padding" pp-customizer-placeholder="px"><strong>24px</strong></label><input pp-default-value="24" id="side-padding" class="regular-text range-slider-input" name="password_protected_form_bg_styles[side-padding]" min="0" max="100" step="1" value="24" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="24">Reset</button></div></td></tr><tr><th scope="row"><label for="transparent">Transparent</label></th><td><div class="pp-toggle-wrapper">
1884 <input type="checkbox" value="yes" id="transparent" name="password_protected_form_bg_styles[transparent]">
1885 <label class="pp-toggle" for="transparent">
1886 <span class="pp-toggle-slider"></span>
1887 </label>
1888 </div></td></tr><tr><th scope="row"><label for="vertical-padding">Vertical Padding</label></th><td><div class="range-slider-wrapper"><label for="vertical-padding" pp-customizer-placeholder="px"><strong>26px</strong></label><input pp-default-value="26" id="vertical-padding" class="regular-text range-slider-input" name="password_protected_form_bg_styles[vertical-padding]" min="0" max="100" step="1" value="26" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="26">Reset</button></div></td></tr><tr><th scope="row"><label for="width">Width</label></th><td><div class="range-slider-wrapper"><label for="width" pp-customizer-placeholder="px"><strong>320px</strong></label><input pp-default-value="320" id="width" class="regular-text range-slider-input" name="password_protected_form_bg_styles[width]" min="300" max="800" step="1" value="320" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="320">Reset</button></div></td></tr></tbody></table>
1889
1890 </div>';
1891 break;
1892 case 'body-background':
1893 $url = add_query_arg(
1894 array(
1895 'utm_source' => 'plugin',
1896 'utm_medium' => 'pop_up',
1897 'utm_campaign' => 'plugin',
1898 'utm_content' => 'body_background'
1899 ),
1900 'https://passwordprotectedwp.com/pricing/'
1901 );
1902
1903 echo '<div>
1904 <h2>Body Background <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1905
1906 <table class="form-table" role="presentation"><tbody><tr><th scope="row"><label for="bg-color">Background Color</label></th><td><div class="wp-picker-container"><button type="button" class="button wp-color-result" aria-expanded="false" style="background-color: rgb(241, 241, 241);"><span class="wp-color-result-text">Select Color</span></button><span class="wp-picker-input-wrap hidden"><label><span class="screen-reader-text">Color value</span><input type="text" value="#f1f1f1" id="bg-color" name="password_protected_body_bg_styles[bg-color]" class="regular-text pp-color-selector wp-color-picker"></label><input type="button" class="button button-small wp-picker-clear" value="Clear" aria-label="Clear color"></span><div class="wp-picker-holder"><div class="iris-picker iris-border" style="display: none; width: 255px; height: 202.125px; padding-bottom: 23.2209px;"><div class="iris-picker-inner"><div class="iris-square" style="width: 182.125px; height: 182.125px;"><a class="iris-square-value ui-draggable ui-draggable-handle" href="#" style="left: 0px; top: 9.10625px;"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz" style="background-image: -webkit-linear-gradient(left, rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255), rgb(255, 255, 255));"></div><div class="iris-square-inner iris-square-vert" style="background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgb(0, 0, 0));"></div></div><div class="iris-slider iris-strip" style="height: 205.346px; width: 28.2px; background-image: -webkit-linear-gradient(top, rgb(240, 0, 0), rgb(242, 242, 242));"><div class="iris-slider-offset ui-slider ui-corner-all ui-slider-vertical ui-widget ui-widget-content"><span tabindex="0" class="ui-slider-handle ui-corner-all ui-state-default" style="bottom: 0%;"></span></div></div></div><div class="iris-palette-container"><a class="iris-palette" tabindex="0" style="background-color: rgb(0, 0, 0); height: 19.5784px; width: 19.5784px; margin-left: 0px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(255, 255, 255); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 51, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 153, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(238, 238, 34); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(129, 215, 66); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(30, 115, 190); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(130, 36, 227); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a></div></div></div></div></td></tr><tr><th scope="row"><label for="bg-image">Background Image</label></th><td><div class="pp-media-wrapper">
1907 <button class="button pp-media-upload">Upload</button>
1908 </div></td></tr><tr><th scope="row"><label for="bg-repeat">Background Repeat</label></th><td><select id="bg-repeat" name="password_protected_body_bg_styles[bg-repeat]" class="regular-text">
1909 <option value="no-repeat" selected="selected">No Repeat</option><option value="repeat">Repeat</option><option value="repeat-x">Repeat Horizontally</option><option value="repeat-y">Repeat Vertically</option>
1910 </select></td></tr><tr><th scope="row"><label for="bg-size">Background Size</label></th><td><select id="bg-size" name="password_protected_body_bg_styles[bg-size]" class="regular-text">
1911 <option value="auto">Auto</option><option value="cover" selected="selected">Cover</option><option value="contain">Contain</option>
1912 </select></td></tr><tr><th scope="row"><label for="bg-position">Background Position</label></th><td><select id="bg-position" name="password_protected_body_bg_styles[bg-position]" class="regular-text">
1913 <option value="left top">Left Top</option><option value="left center">Left Center</option><option value="left bottom">Left Bottom</option><option value="right top">Right Top</option><option value="right center">Right Center</option><option value="right bottom">Right Bottom</option><option value="center top">Center Top</option><option value="center center" selected="selected">Center Center</option><option value="center bottom">Center Bottom</option>
1914 </select></td></tr></tbody></table>
1915
1916 </div>';
1917 break;
1918 case 'below-form':
1919 $url = add_query_arg(
1920 array(
1921 'utm_source' => 'plugin',
1922 'utm_medium' => 'pop_up',
1923 'utm_campaign' => 'plugin',
1924 'utm_content' => 'form_content'
1925 ),
1926 'https://passwordprotectedwp.com/pricing/'
1927 );
1928
1929 echo '<div>
1930 <h2>Form Content <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1931
1932 <table class="form-table" role="presentation"><tbody><tr><th scope="row"><label for="font">Font</label></th><td><select id="font" name="password_protected_below_form_styles[font]" class="regular-text">
1933 <option value="default" selected="selected">Default</option><option value="Abril Fatface">Abril Fatface</option><option value="Georgia">Georgia</option><option value="Helvetica">Helvetica</option><option value="Lato">Lato</option><option value="Lora">Lora</option><option value="Karla">Karla</option><option value="Josefin Sans">Josefin Sans</option><option value="Montserrat">Montserrat</option><option value="Open Sans">Open Sans</option><option value="Oswald">Oswald</option><option value="Overpass">Overpass</option><option value="Poppins">Poppins</option><option value="PT Sans">PT Sans</option><option value="Roboto">Roboto</option><option value="Fira Sans">Fira Sans</option><option value="Times New Roman">Times New Roman</option><option value="Nunito">Nunito</option><option value="Merriweather">Merriweather</option><option value="Rubik">Rubik</option><option value="Playfair Display">Playfair Display</option><option value="Spectral">Spectral</option>
1934 </select></td></tr><tr><th scope="row"><label for="font-size">Font Size</label></th><td><div class="range-slider-wrapper"><label for="font-size" pp-customizer-placeholder="px"><strong>14px</strong></label><input pp-default-value="14" id="font-size" class="regular-text range-slider-input" name="password_protected_below_form_styles[font-size]" min="0" max="100" step="1" value="14" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="14">Reset</button></div></td></tr><tr><th scope="row"><label for="position">Position</label></th><td><div class="range-slider-wrapper"><label for="position" pp-customizer-placeholder="px"><strong>0px</strong></label><input pp-default-value="0" id="position" class="regular-text range-slider-input" name="password_protected_below_form_styles[position]" min="0" max="100" step="1" value="0" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="0">Reset</button></div></td></tr><tr><th scope="row"><label for="color">Color</label></th><td><div class="wp-picker-container"><button type="button" class="button wp-color-result" aria-expanded="false" style="background-color: rgb(114, 119, 124);"><span class="wp-color-result-text">Select Color</span></button><span class="wp-picker-input-wrap hidden"><label><span class="screen-reader-text">Color value</span><input type="text" value="#72777c" id="color" name="password_protected_below_form_styles[color]" class="regular-text pp-color-selector wp-color-picker"></label><input type="button" class="button button-small wp-picker-clear" value="Clear" aria-label="Clear color"></span><div class="wp-picker-holder"><div class="iris-picker iris-border" style="display: none; width: 255px; height: 202.125px; padding-bottom: 23.2209px;"><div class="iris-picker-inner"><div class="iris-square" style="width: 182.125px; height: 182.125px;"><a class="iris-square-value ui-draggable ui-draggable-handle" href="#" style="left: 106.24px; top: 92.8838px;"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz" style="background-image: -webkit-linear-gradient(left, rgb(255, 235, 235), rgb(255, 245, 235), rgb(255, 255, 235), rgb(245, 255, 235), rgb(235, 255, 235), rgb(235, 255, 245), rgb(235, 255, 255), rgb(235, 245, 255), rgb(235, 235, 255), rgb(245, 235, 255), rgb(255, 235, 255), rgb(255, 235, 245), rgb(255, 235, 235));"></div><div class="iris-square-inner iris-square-vert" style="background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgb(0, 0, 0));"></div></div><div class="iris-slider iris-strip" style="height: 205.346px; width: 28.2px; background-image: -webkit-linear-gradient(top, rgb(0, 61, 122), rgb(125, 125, 125));"><div class="iris-slider-offset ui-slider ui-corner-all ui-slider-vertical ui-widget ui-widget-content"><span tabindex="0" class="ui-slider-handle ui-corner-all ui-state-default" style="bottom: 8%;"></span></div></div></div><div class="iris-palette-container"><a class="iris-palette" tabindex="0" style="background-color: rgb(0, 0, 0); height: 19.5784px; width: 19.5784px; margin-left: 0px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(255, 255, 255); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 51, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 153, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(238, 238, 34); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(129, 215, 66); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(30, 115, 190); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(130, 36, 227); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a></div></div></div></div></td></tr><tr><th scope="row"><label for="text-alignment">Text Alignment</label></th><td><select id="text-alignment" name="password_protected_below_form_styles[text-alignment]" class="regular-text">
1935 <option value="left">Left</option><option value="center" selected="selected">Center</option><option value="right">Right</option>
1936 </select></td></tr></tbody></table>
1937
1938 </div>';
1939 break;
1940 case 'below-page':
1941 $url = add_query_arg(
1942 array(
1943 'utm_source' => 'plugin',
1944 'utm_medium' => 'pop_up',
1945 'utm_campaign' => 'plugin',
1946 'utm_content' => 'page_content'
1947 ),
1948 'https://passwordprotectedwp.com/pricing/'
1949 );
1950
1951 echo '<div>
1952 <h2>Page Content <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1953
1954 <table class="form-table" role="presentation"><tbody><tr><th scope="row"><label for="font">Font</label></th><td><select id="font" name="password_protected_below_page_styles[font]" class="regular-text">
1955 <option value="default" selected="selected">Default</option><option value="Abril Fatface">Abril Fatface</option><option value="Georgia">Georgia</option><option value="Helvetica">Helvetica</option><option value="Lato">Lato</option><option value="Lora">Lora</option><option value="Karla">Karla</option><option value="Josefin Sans">Josefin Sans</option><option value="Montserrat">Montserrat</option><option value="Open Sans">Open Sans</option><option value="Oswald">Oswald</option><option value="Overpass">Overpass</option><option value="Poppins">Poppins</option><option value="PT Sans">PT Sans</option><option value="Roboto">Roboto</option><option value="Fira Sans">Fira Sans</option><option value="Times New Roman">Times New Roman</option><option value="Nunito">Nunito</option><option value="Merriweather">Merriweather</option><option value="Rubik">Rubik</option><option value="Playfair Display">Playfair Display</option><option value="Spectral">Spectral</option>
1956 </select></td></tr><tr><th scope="row"><label for="font-size">Font Size</label></th><td><div class="range-slider-wrapper"><label for="font-size" pp-customizer-placeholder="px"><strong>14px</strong></label><input pp-default-value="14" id="font-size" class="regular-text range-slider-input" name="password_protected_below_page_styles[font-size]" min="0" max="100" step="1" value="14" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="14">Reset</button></div></td></tr><tr><th scope="row"><label for="position">Position</label></th><td><div class="range-slider-wrapper"><label for="position" pp-customizer-placeholder="px"><strong>0px</strong></label><input pp-default-value="0" id="position" class="regular-text range-slider-input" name="password_protected_below_page_styles[position]" min="0" max="100" step="1" value="0" type="range"><button type="button" style="margin: 5px 0 0 5px" class="button button-secondary button-small reset-range" pp-default-value="0">Reset</button></div></td></tr><tr><th scope="row"><label for="color">Color</label></th><td><div class="wp-picker-container"><button type="button" class="button wp-color-result" aria-expanded="false" style="background-color: rgb(114, 119, 124);"><span class="wp-color-result-text">Select Color</span></button><span class="wp-picker-input-wrap hidden"><label><span class="screen-reader-text">Color value</span><input type="text" value="#72777c" id="color" name="password_protected_below_page_styles[color]" class="regular-text pp-color-selector wp-color-picker"></label><input type="button" class="button button-small wp-picker-clear" value="Clear" aria-label="Clear color"></span><div class="wp-picker-holder"><div class="iris-picker iris-border" style="display: none; width: 255px; height: 202.125px; padding-bottom: 23.2209px;"><div class="iris-picker-inner"><div class="iris-square" style="width: 182.125px; height: 182.125px;"><a class="iris-square-value ui-draggable ui-draggable-handle" href="#" style="left: 106.24px; top: 92.8838px;"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz" style="background-image: -webkit-linear-gradient(left, rgb(255, 235, 235), rgb(255, 245, 235), rgb(255, 255, 235), rgb(245, 255, 235), rgb(235, 255, 235), rgb(235, 255, 245), rgb(235, 255, 255), rgb(235, 245, 255), rgb(235, 235, 255), rgb(245, 235, 255), rgb(255, 235, 255), rgb(255, 235, 245), rgb(255, 235, 235));"></div><div class="iris-square-inner iris-square-vert" style="background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgb(0, 0, 0));"></div></div><div class="iris-slider iris-strip" style="height: 205.346px; width: 28.2px; background-image: -webkit-linear-gradient(top, rgb(0, 61, 122), rgb(125, 125, 125));"><div class="iris-slider-offset ui-slider ui-corner-all ui-slider-vertical ui-widget ui-widget-content"><span tabindex="0" class="ui-slider-handle ui-corner-all ui-state-default" style="bottom: 8%;"></span></div></div></div><div class="iris-palette-container"><a class="iris-palette" tabindex="0" style="background-color: rgb(0, 0, 0); height: 19.5784px; width: 19.5784px; margin-left: 0px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(255, 255, 255); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 51, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(221, 153, 51); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(238, 238, 34); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(129, 215, 66); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(30, 115, 190); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a><a class="iris-palette" tabindex="0" style="background-color: rgb(130, 36, 227); height: 19.5784px; width: 19.5784px; margin-left: 3.6425px;"></a></div></div></div></div></td></tr><tr><th scope="row"><label for="text-alignment">Text Alignment</label></th><td><select id="text-alignment" name="password_protected_below_page_styles[text-alignment]" class="regular-text">
1957 <option value="left">Left</option><option value="center" selected="selected">Center</option><option value="right">Right</option>
1958 </select></td></tr></tbody></table>
1959
1960 </div>';
1961 break;
1962 case 'custom-css':
1963 $url = add_query_arg(
1964 array(
1965 'utm_source' => 'plugin',
1966 'utm_medium' => 'pop_up',
1967 'utm_campaign' => 'plugin',
1968 'utm_content' => 'page_content'
1969 ),
1970 'https://passwordprotectedwp.com/pricing/'
1971 );
1972
1973 echo '<div>
1974 <h2>Custom CSS <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1975
1976 <table class="form-table" role="presentation"><tbody><tr><th scope="row"><label for="custom-css">Custom CSS</label></th><td><textarea id="custom-css" name="password_protected_custom_css_styles[custom-css]" class="large-text"></textarea></td></tr></tbody></table>
1977
1978 </div>';
1979 break;
1980
1981 case 'password-request':
1982 $url = add_query_arg(
1983 array(
1984 'utm_source' => 'plugin',
1985 'utm_medium' => 'pop_up',
1986 'utm_campaign' => 'plugin',
1987 'utm_content' => 'password-request'
1988 ),
1989 'https://passwordprotectedwp.com/pricing/'
1990 );
1991
1992 echo '<div>
1993 <h2>Request Password <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
1994
1995 <table class="form-table" role="presentation"><tbody><tr><th scope="row"><label for="enable-password-requests">Enable Password Requests</label></th><td><div class="pp-toggle-wrapper">
1996 <input type="checkbox" value="yes" id="enable-password-requests" name="pp_password_request_setting[enable-password-requests]" checked="checked">
1997 <label class="pp-toggle" for="enable-password-requests">
1998 <span class="pp-toggle-slider"></span>
1999 </label>
2000 </div><p class="desc"><strong>Enable password requests for your site.</strong></p></td></tr><tr><th scope="row"><label for="password-request-label">Password Request Label</label></th><td><input type="text" value="Request for password" id="password-request-label" name="pp_password_request_setting[password-request-label]" class="regular-text"><p class="desc"><strong>Change the label of the password request button.</strong></p></td></tr><tr><th scope="row"><label for="add-your-email-label">Add Your Email Label</label></th><td><input type="text" value="Email Address" id="add-your-email-label" name="pp_password_request_setting[add-your-email-label]" class="regular-text"><p class="desc"><strong>Change the label of the email input field.</strong></p></td></tr><tr><th scope="row"><label for="email-place-holder-label">Email Placeholder Label</label></th><td><input type="text" value="Enter your email address" id="email-place-holder-label" name="pp_password_request_setting[email-place-holder-label]" class="regular-text"><p class="desc"><strong>Change the placeholder of the email input field.</strong></p></td></tr><tr><th scope="row"><label for="validation-button-label">Validation Button Label</label></th><td><input type="text" value="Validate your email" id="validation-button-label" name="pp_password_request_setting[validation-button-label]" class="regular-text"><p class="desc"><strong>Change the label of the validation button.</strong></p></td></tr></tbody></table>
2001 </div>';
2002 break;
2003 case 'requests':
2004 $url = add_query_arg(
2005 array(
2006 'utm_source' => 'plugin',
2007 'utm_medium' => 'pop_up',
2008 'utm_campaign' => 'plugin',
2009 'utm_content' => 'password-request'
2010 ),
2011 'https://passwordprotectedwp.com/pricing/'
2012 );
2013
2014 echo '<div>
2015 <h2>Requests <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
2016
2017 <div class="pp-settings-wrapper">
2018 <div style="margin: 10px 0;">
2019 <a style="margin: 0 10px;text-decoration: none;" href="http://password-protected.test/wp-admin/admin.php?page=password-protected&amp;tab=request-password&amp;sub-tab=requests">All (1)</a>
2020 <a style="margin: 0 10px;text-decoration: none;" href="http://password-protected.test/wp-admin/admin.php?page=password-protected&amp;tab=request-password&amp;sub-tab=requests&amp;status=pending">Pending (0)</a>
2021 <a style="margin: 0 10px;text-decoration: none;;" href="http://password-protected.test/wp-admin/admin.php?page=password-protected&amp;tab=request-password&amp;sub-tab=requests&amp;status=approved">Approved (1)</a>
2022 <a style="margin: 0 10px;text-decoration: none;;" href="http://password-protected.test/wp-admin/admin.php?page=password-protected&amp;tab=request-password&amp;sub-tab=requests&amp;status=rejected">Rejected (0)</a>
2023 </div><table class="wp-list-table widefat fixed striped table-view-list ">
2024 <thead>
2025 <tr>
2026 <th scope="col" id="id" class="manage-column column-id column-primary">ID</th><th scope="col" id="email" class="manage-column column-email">Email</th><th scope="col" id="requested_content" class="manage-column column-requested_content">Requested Content</th><th scope="col" id="status" class="manage-column column-status">Status</th><th scope="col" id="datetime" class="manage-column column-datetime">Date &amp; Time</th><th scope="col" id="action" class="manage-column column-action">Action</th> </tr>
2027 </thead>
2028
2029 <tbody id="the-list">
2030 <tr><td class="id column-id has-row-actions column-primary" data-colname="ID">1<button type="button" class="toggle-row"><span class="screen-reader-text">Show more details</span></button></td><td class="email column-email" data-colname="Email">email@localwp.com</td><td class="requested_content column-requested_content" data-colname="Requested Content">wp-admin/admin.sds</td><td class="status column-status" data-colname="Status"><span class="pp-status pp-status-approved">Approved</span></td><td class="datetime column-datetime" data-colname="Date &amp; Time">March 27, 2025, 6:06 am</td><td class="action column-action" data-colname="Action"><a href="http://password-protected.test/wp-admin/admin.php?page=password-protected&amp;tab=request-password&amp;sub-tab=requests&amp;action=resend&amp;id=1&amp;_wpnonce=b5c8a49b1b&amp;email=email@localwp.com" class="pp-rensend-password-email">Send Password Email</a>
2031 |
2032 <a href="http://password-protected.test/wp-admin/admin.php?page=password-protected&amp;tab=request-password&amp;sub-tab=requests&amp;action=delete&amp;id=1&amp;_wpnonce=5468d5c8c5" class="pp-delete-request">Delete</a></td></tr> </tbody>
2033
2034 <tfoot>
2035 <tr>
2036 <th scope="col" class="manage-column column-id column-primary">ID</th><th scope="col" class="manage-column column-email">Email</th><th scope="col" class="manage-column column-requested_content">Requested Content</th><th scope="col" class="manage-column column-status">Status</th><th scope="col" class="manage-column column-datetime">Date &amp; Time</th><th scope="col" class="manage-column column-action">Action</th> </tr>
2037 </tfoot>
2038
2039 </table>
2040 </div>
2041 </div>';
2042 break;
2043 case 'email-templates':
2044 $url = add_query_arg(
2045 array(
2046 'utm_source' => 'plugin',
2047 'utm_medium' => 'pop_up',
2048 'utm_campaign' => 'plugin',
2049 'utm_content' => 'password-request'
2050 ),
2051 'https://passwordprotectedwp.com/pricing/'
2052 );
2053
2054 echo '<div>
2055 <h2>Email Templates <span class="pro-badge"><a href="' . $url . '">PRO</a></span></h2>
2056
2057 <div class="ppp-email-templates" id="validations"><h2>Validation\'s</h2>
2058 <table class="form-table" role="presentation"><tbody><tr><th scope="row"><label for="rp-validation-subject">Email Subject</label></th><td><input type="text" value="Verify Your Email Address for Password Request" id="rp-validation-subject" name="pp_email_templates_setting[rp-validation-subject]" class="regular-text"><p class="desc"><strong>Email template for validation email subject. Use <code>{site_name}</code> to replace with site name.</strong></p></td></tr><tr><th scope="row"><label for="rp-validation-body">Email Body</label></th><td><textarea id="rp-validation-body" name="pp_email_templates_setting[rp-validation-body]" class="regular-text">Hello,
2059 Thank you for requesting access to our protected content. To proceed, we need to verify your email address.
2060 Please click the link below to validate your email:
2061 {validation_link}
2062 If you did not make this request, you can ignore this email.
2063 Best regards,
2064 {site_name}</textarea><p class="desc"><strong>Email template for validation email body. Use <code>{site_name}</code> to replace with site name. use <code>{validation_link}</code> to replace with validation link.</strong></p></td></tr></tbody></table></div>
2065 </div>';
2066 break;
2067 }
2068 }
2069 echo '</div>
2070 </div>';
2071 }
2072
2073 public function cache_related_issue() {
2074 echo '<form action="options.php" method="post">';
2075 do_settings_sections( 'password-protected&tab=advanced&sub-tab=cache-issue' );
2076 settings_fields( 'password_protected_cache_issue' );
2077 submit_button();
2078 echo '</form>';
2079 }
2080
2081 }
2082