PluginProbe
Easy Basic Authentication – Add basic auth to site or admin area / 2.6
Easy Basic Authentication – Add basic auth to site or admin area v2.6
trunk 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4 1.4.1 1.5 1.5.1 1.5.2 1.5.3 1.6 1.6.1 1.6.2 1.6.3 1.6.4 1.7 1.7.1 1.8 1.8.1 1.9 All 50 releases
easy-basic-authentication / template / settings_page.php

settings_page.php in Easy Basic Authentication – Add basic auth to site or admin area 2.6, at template/settings_page.php

105 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 $dir_file = realpath(dirname(__FILE__) . '/../class/easy-basic-authentication-class.php');
3 $content_file = "add_action( 'init', array(\$this,'basic_auth_admin') );";
4 ?>
5
6 <div class="wrap easy-basic-settings">
7 <div class="error-message">
8 <?php settings_errors(); ?>
9 </div>
10 <form method="post" action="options.php" class="easy-basic-form">
11 <?php
12 settings_fields( 'basic-auth-plugin-settings' );
13 do_settings_sections( 'basic-auth-plugin-settings' );
14 submit_button(__('save', 'easy-basic-authentication'), 'primary', 'eba_submit', false);
15 ?>
16 </form>
17 <div id="password-recovery-alert" class="container">
18 <div class="alert alert-warning alert-dismissible fade show" role="alert">
19 <strong><?php echo esc_html__('Attention:', 'easy-basic-authentication'); ?></strong> <?php echo esc_html__('To recover your password, you need to comment out a line in a file via FTP.', 'easy-basic-authentication'); ?>
20 <?php echo esc_html__('Please follow the instructions', 'easy-basic-authentication'); ?> <a href="#" class="alert-link" onclick="toggleInstructions()"><?php echo esc_html__('here.', 'easy-basic-authentication');?></a>
21 </div>
22
23 <div id="instructions" style="display: none;" class="mt-3">
24 <p><strong><?php echo esc_html__('Instructions:', 'easy-basic-authentication'); ?></strong></p>
25 <ol>
26 <li><?php echo esc_html__('Connect to your website via FTP.', 'easy-basic-authentication'); ?></li>
27 <li><?php echo esc_html__('Navigate to the plugin directory.', 'easy-basic-authentication'); ?></li>
28 <li><?php
29 // translators: %s è il percorso del file del plugin
30 echo sprintf(esc_html__('Locate the file named %s.', 'easy-basic-authentication'), esc_attr($dir_file)); ?>
31 </li>
32 <li><?php
33 // translators: %s is the content file path
34 echo sprintf(esc_html__('Find the line containing %s.', 'easy-basic-authentication'), esc_attr($content_file)); ?>
35 </li>
36 <li><?php echo esc_html__('Comment out that line by adding "#" at the beginning.', 'easy-basic-authentication'); ?></li>
37 <li><?php echo esc_html__('Save the file and re-upload it to your server.', 'easy-basic-authentication'); ?></li>
38 </ol>
39 </div>
40 </div>
41
42 <script>
43 function toggleInstructions() {
44 var instructions = document.getElementById("instructions");
45 if (instructions.style.display === "none") {
46 instructions.style.display = "block";
47 } else {
48 instructions.style.display = "none";
49 }
50 }
51 </script>
52
53 </div>
54
55 <style>
56 .easy-basic-settings {
57 background-color: #f9f9f9;
58 padding: 20px;
59 border: 1px solid #ddd;
60 }
61
62 .easy-basic-form {
63 margin-top: 20px;
64 }
65
66 .easy-basic-form input[type="text"],
67 .easy-basic-form input[type="password"],
68 .easy-basic-form textarea {
69 width: 100%;
70 padding: 10px;
71 margin-top: 10px;
72 border: 1px solid #ddd;
73 border-radius: 4px;
74 }
75
76 .easy-basic-form .submit {
77 background-color: #0073aa;
78 color: #fff;
79 border: none;
80 padding: 10px 20px;
81 border-radius: 4px;
82 cursor: pointer;
83 }
84
85 .easy-basic-form .submit:hover {
86 background-color: #005b82;
87 }
88
89 .easy-basic-form input[type=checkbox],
90 .easy-basic-form input[type=radio] {
91 padding: 10px 20px;
92 height: 1.5625rem;
93 width: 1.5625rem;
94 }
95
96 .easy-basic-form input[type=checkbox]:checked:before {
97 width: 1.875rem;
98 height: 1.875rem;
99 margin: -0.1875rem -0.3125rem;
100 }
101
102 .easy-basic-settings #password-recovery-alert {
103 margin-top: 30px;
104 }
105 </style>