PluginProbe ʕ •ᴥ•ʔ
Advanced Access Manager – Access Governance for WordPress / trunk
Advanced Access Manager – Access Governance for WordPress vtrunk
6.8.4 6.8.5 6.9.0 6.9.1 6.9.10 6.9.11 6.9.12 6.9.13 6.9.14 6.9.15 6.9.16 6.9.17 6.9.18 6.9.19 6.9.2 6.9.20 6.9.21 6.9.22 6.9.23 6.9.24 6.9.25 6.9.26 6.9.27 6.9.28 6.9.29 6.9.3 6.9.30 6.9.31 6.9.32 6.9.33 6.9.34 6.9.35 6.9.36 6.9.37 6.9.38 6.9.39 6.9.4 6.9.41 6.9.42 6.9.43 6.9.44 6.9.45 6.9.46 6.9.47 6.9.48 6.9.49 6.9.5 6.9.51 6.9.6 6.9.7 6.9.8 6.9.9 7.0.0 7.0.0-alpha.6 7.0.0-alpha.7 7.0.0-beta.1 7.0.0-rc1 7.0.0-rc2 7.0.0-rc3 7.0.1 7.0.10 7.0.11 7.0.2 7.0.3 7.0.4 7.0.5 7.0.6 7.0.7 7.0.8 7.0.9 7.1.0 7.1.1 trunk 3.0 4.0 4.0.1 4.1 4.2 4.3 4.4 4.4.1 4.5 4.6 4.6.1 4.6.2 4.7 4.7.1 4.7.2 4.7.5 4.7.6 4.8 4.8.1 4.9 4.9.1 4.9.2 4.9.3 4.9.4 4.9.5 4.9.5.1 4.9.5.2 5.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.1 5.1.1 5.10 5.11 5.2 5.2.1 5.2.5 5.2.6 5.2.7 5.3 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.4 5.4.1 5.4.2 5.4.3 5.4.3.1 5.4.3.2 5.5 5.5.1 5.5.2 5.6 5.6.1 5.6.1.1 5.7 5.7.1 5.7.2 5.7.3 5.8 5.8.1 5.8.2 5.8.3 5.9 5.9.1 5.9.1.1 5.9.2 5.9.2.1 5.9.3 5.9.4 5.9.5 5.9.6 5.9.6.1 5.9.6.2 5.9.6.3 5.9.7 5.9.7.1 5.9.7.2 5.9.7.3 5.9.8 5.9.8.1 5.9.9 5.9.9.1 6.0.0 6.0.1 6.0.2 6.0.3 6.0.4 6.0.5 6.1.0 6.1.1 6.2.0 6.2.1 6.2.2 6.3.0 6.3.1 6.3.2 6.3.3 6.4.0 6.4.1 6.4.2 6.4.3 6.5.0 6.5.1 6.5.2 6.5.3 6.5.4 6.6.0 6.6.1 6.6.2 6.6.3 6.6.4 6.7.0 6.7.1 6.7.2 6.7.3 6.7.4 6.7.5 6.7.6 6.7.7 6.7.8 6.7.9 6.8.0 6.8.1 6.8.2 6.8.3
advanced-access-manager / application / Backend / tmpl / service / url.php
advanced-access-manager / application / Backend / tmpl / service Last commit date
access-denied-redirect.php 1 year ago admin-toolbar.php 1 year ago api-route.php 1 year ago backend-menu.php 1 year ago capability.php 1 year ago content.php 1 year ago identity.php 1 year ago jwt.php 5 months ago login-redirect.php 1 year ago logout-redirect.php 1 year ago metabox.php 1 year ago not-found-redirect.php 1 year ago policy.php 1 year ago url.php 1 year ago welcome.php 1 year ago widget.php 1 year ago
url.php
198 lines
1 <?php /** @version 7.0.0 **/ ?>
2
3 <?php if (defined('AAM_KEY')) { ?>
4 <?php
5 $access_level = AAM_Backend_AccessLevel::get_instance();
6 $service = $access_level->urls();
7 ?>
8
9 <div class="aam-feature" id="url-content">
10 <div class="row">
11 <div class="col-xs-12">
12 <?php if (AAM::api()->config->get('core.settings.ui.tips')) { ?>
13 <p class="aam-info">
14 <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Manage access to an unlimited number of individual URLs. With the premium %sComplete Package%s, you can use the wildcard [*] denotation to manage access to a specific website section (e.g. [/members/*], [/premium*]) or make the entire website private. To learn more, refer to our official documentation page %shere%s.', 'strong', 'i', 'i'), '<a href="https://aamportal.com/premium?ref=plugin" target="_blank">', '</a>', '<a href="https://aamportal.com/article/managing-access-to-wordpress-website-urls?ref=plugin" target="_blank">', '</a>'); ?>
15 </p>
16 <?php } ?>
17
18 <div
19 class="aam-overwrite"
20 id="aam-uri-overwrite"
21 style="display: <?php echo ($service->is_customized() ? 'block' : 'none'); ?>"
22 >
23 <span><i class="icon-check"></i> <?php echo __('Settings are customized', 'advanced-access-manager'); ?></span>
24 <span><a href="#" id="uri-reset" class="btn btn-xs btn-primary"><?php echo __('Reset to default', 'advanced-access-manager'); ?></a></span>
25 </div>
26
27 <table id="uri-list" class="table table-striped table-bordered">
28 <thead>
29 <tr>
30 <th width="60%"><?php echo __('URL', 'advanced-access-manager'); ?></th>
31 <th width="20%"><?php echo __('Type', 'advanced-access-manager'); ?></th>
32 <th><?php echo __('Actions', 'advanced-access-manager'); ?></th>
33 <th>Rule</th>
34 </tr>
35 </thead>
36 <tbody></tbody>
37 </table>
38 </div>
39 </div>
40
41 <div class="modal fade" id="uri-model" tabindex="-1" role="dialog">
42 <div class="modal-dialog" role="document">
43 <div class="modal-content">
44 <div class="modal-header">
45 <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', 'advanced-access-manager'); ?>"><span aria-hidden="true">&times;</span></button>
46 <h4 class="modal-title"><?php echo __('URL Access Rule', 'advanced-access-manager'); ?></h4>
47 </div>
48 <div class="modal-body">
49 <div class="form-group">
50 <label><?php echo AAM_Backend_View_Helper::preparePhrase('Enter URL [(wildcard * is available with premium add-on)]', 'small'); ?></label>
51 <input
52 type="text"
53 class="form-control form-clearable"
54 id="url_rule_url"
55 placeholder="<?php echo __('Enter valid URL', 'advanced-access-manager'); ?>"
56 />
57 </div>
58
59 <label><?php echo __('What should be done when a URL is matched?', 'advanced-access-manager'); ?></label><br />
60
61 <?php
62 $restriction_types = apply_filters('aam_ui_url_restriction_types_filter', [
63 'allow' => [
64 'title' => __('Allow direct access', 'advanced-access-manager')
65 ],
66 'deny' => [
67 'title' => __('Restrict direct access (Access Denied Redirect preference is applied)', 'advanced-access-manager')
68 ],
69 'custom_message' => [
70 'title' => __('Show customized message (plain text or HTML)', 'advanced-access-manager')
71 ],
72 'page_redirect' => [
73 'title' => __('Redirected to existing page (select from the drop-down)', 'advanced-access-manager')
74 ],
75 'url_redirect' => [
76 'title' => __('Redirected to a different URL (valid URL, starting with http or https is required)', 'advanced-access-manager')
77 ],
78 'trigger_callback' => [
79 'title' => __('Trigger PHP callback function (valid HP callback is required)', 'advanced-access-manager')
80 ],
81 ]);
82
83 if ($access_level->is_visitor()) {
84 $restriction_types['login_redirect'] = [
85 'title' => __('Redirect to the login page (after login, user will be redirected back to the restricted page)', 'advanced-access-manager')
86 ];
87 }
88 ?>
89
90 <?php foreach($restriction_types as $type => $props) { ?>
91 <div class="radio">
92 <input
93 type="radio"
94 name="uri.access.type"
95 id="url_access_<?php echo esc_attr($type); ?>"
96 value="<?php echo esc_attr($type); ?>"
97 />
98 <label for="url_access_<?php echo esc_attr($type); ?>">
99 <?php echo esc_js($props['title']); ?>
100 </label>
101 </div>
102 <?php } ?>
103
104 <div class="form-group aam-uri-access-action" id="url_access_custom_message_attrs" style="display: none;">
105 <label><?php echo __('Customized Message', 'advanced-access-manager'); ?></label>
106 <textarea
107 class="form-control form-clearable"
108 rows="3"
109 id="url_access_custom_message_value"
110 placeholder="<?php echo __('Enter message...', 'advanced-access-manager'); ?>">
111 </textarea>
112 </div>
113
114 <div class="form-group aam-uri-access-action" id="url_access_page_redirect_attrs" style="display: none;">
115 <label><?php echo __('Existing Page', 'advanced-access-manager'); ?></label>
116 <?php
117 wp_dropdown_pages(array(
118 'depth' => 99,
119 'echo' => 1,
120 'id' => 'url_access_page_redirect_value',
121 'class' => 'form-control form-clearable',
122 'show_option_none' => __('-- Select Page --', 'advanced-access-manager')
123 ));
124 ?>
125 </div>
126
127 <div class="form-group aam-uri-access-action" id="url_access_url_redirect_attrs" style="display: none;">
128 <label><?php echo __('The Valid Redirect URL', 'advanced-access-manager'); ?></label>
129 <input
130 type="text"
131 class="form-control form-clearable"
132 placeholder="https://"
133 id="url_access_url_redirect_value"
134 />
135 </div>
136
137 <div class="form-group aam-uri-access-action" id="url_access_http_status_code" style="display: none;">
138 <label><?php echo __('HTTP Redirect Code', 'advanced-access-manager'); ?></label>
139 <select class="form-control form-clearable" id="url_access_http_redirect_code">
140 <option value=""><?php echo __('HTTP Code (Default 307)', 'advanced-access-manager'); ?></option>
141 <option value="301"><?php echo __('301 - Moved Permanently', 'advanced-access-manager'); ?></option>
142 <option value="302"><?php echo __('302 - Found', 'advanced-access-manager'); ?></option>
143 <option value="303"><?php echo __('303 - See Other', 'advanced-access-manager'); ?></option>
144 <option value="307"><?php echo __('307 - Temporary Redirect', 'advanced-access-manager'); ?></option>
145 </select>
146 </div>
147
148 <div class="form-group aam-uri-access-action" id="url_access_trigger_callback_attrs" style="display: none;">
149 <label><?php echo __('PHP Callback Function', 'advanced-access-manager'); ?></label>
150 <input
151 type="text"
152 class="form-control form-clearable"
153 placeholder="Enter valid callback"
154 id="url_access_trigger_callback_value"
155 />
156 </div>
157
158 <?php do_action('aam_ui_url_access_restriction_modal_action'); ?>
159 </div>
160 <div class="modal-footer">
161 <button
162 type="button"
163 class="btn btn-success"
164 id="url_save_btn"
165 ><?php echo __('Save', 'advanced-access-manager'); ?></button>
166 <button
167 type="button"
168 class="btn btn-default"
169 data-dismiss="modal"
170 ><?php echo __('Close', 'advanced-access-manager'); ?></button>
171 </div>
172 </div>
173 </div>
174 </div>
175
176 <div class="modal fade" id="uri-delete-model" tabindex="-1" role="dialog">
177 <div class="modal-dialog modal-sm" role="document">
178 <div class="modal-content">
179 <div class="modal-header">
180 <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', 'advanced-access-manager'); ?>"><span aria-hidden="true">&times;</span></button>
181 <h4 class="modal-title"><?php echo __('Delete URL Rule', 'advanced-access-manager'); ?></h4>
182 </div>
183 <div class="modal-body">
184 <div class="form-group">
185 <p class="aam-notification">
186 <?php echo __('You are about to delete the URL Rule. Please confirm!', 'advanced-access-manager'); ?>
187 </p>
188 </div>
189 </div>
190 <div class="modal-footer">
191 <button type="button" class="btn btn-danger" id="uri-delete-btn"><?php echo __('Delete', 'advanced-access-manager'); ?></button>
192 <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', 'advanced-access-manager'); ?></button>
193 </div>
194 </div>
195 </div>
196 </div>
197 </div>
198 <?php }