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 / not-found-redirect.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
not-found-redirect.php
89 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->not_found_redirect();
7 $settings = $service->get_redirect();
8 ?>
9
10 <div class="aam-feature" id="404redirect-content">
11 <div class="row">
12 <div class="col-xs-12">
13 <?php if (AAM::api()->config->get('core.settings.ui.tips')) { ?>
14 <p class="aam-info">
15 <?php echo __('The "404 Redirect" service ensures seamless user experience by automatically managing 404 (Not Found) errors, redirecting users to relevant pages, URL or trigger a custom PHP callback function to maintain site engagement and reduce bounce rates.', 'advanced-access-manager'); ?>
16 </p>
17 <?php } ?>
18
19 <div
20 class="aam-overwrite"
21 id="aam-404redirect-overwrite"
22 style="display: <?php echo ($service->is_customized() ? 'block' : 'none'); ?>"
23 >
24 <span><i class="icon-check"></i> <?php echo __('Settings are customized', 'advanced-access-manager'); ?></span>
25 <span><a href="#" id="404redirect-reset" class="btn btn-xs btn-primary"><?php echo __('Reset to default', 'advanced-access-manager'); ?></a></span>
26 </div>
27
28 <?php $type = $settings['type'] ?>
29
30 <div class="radio">
31 <input type="radio" name="not_found_redirect_type" id="404redirect-default" data-action="#default-redirect-action" value="default" <?php echo ($type === 'default' ? ' checked' : ''); ?> />
32 <label for="404redirect-default"><?php echo __('WordPress default behavior', 'advanced-access-manager'); ?></label>
33 </div>
34 <div class="radio">
35 <input type="radio" name="not_found_redirect_type" id="404redirect-page" data-action="#page-404redirect-action" value="page_redirect" <?php echo ($type === 'page_redirect' ? ' checked' : ''); ?> />
36 <label for="404redirect-page"><?php echo AAM_Backend_View_Helper::preparePhrase('Redirected to existing page [(select from the drop-down)]', 'small'); ?></label>
37 </div>
38 <div class="radio">
39 <input type="radio" name="not_found_redirect_type" id="404redirect-url" data-action="#url-404redirect-action" value="url_redirect" <?php echo ($type === 'url_redirect' ? ' checked' : ''); ?> />
40 <label for="404redirect-url"><?php echo AAM_Backend_View_Helper::preparePhrase('Redirected to the local URL [(enter full URL starting from http or https)]', 'small'); ?></label>
41 </div>
42 <?php if ($access_level->is_visitor()) { ?>
43 <div class="radio">
44 <input type="radio" name="not_found_redirect_type" id="404-redirect-login" value="login_redirect" data-action="none" <?php echo ($type === 'login_redirect' ? ' checked' : ''); ?> />
45 <label for="404-redirect-login"><?php echo AAM_Backend_View_Helper::preparePhrase('Redirect to the login page [(after login, user will be redirected back to the restricted page)]', 'small'); ?></label>
46 </div>
47 <?php } ?>
48 <div class="radio">
49 <input type="radio" name="not_found_redirect_type" id="404redirect-callback" data-action="#callback-404redirect-action" value="trigger_callback" <?php echo ($type === 'trigger_callback' ? ' checked' : ''); ?> />
50 <label for="404redirect-callback"><?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('Trigger PHP callback function [(valid %sPHP callback%s is required)]', 'small'), '<a href="https://php.net/manual/en/language.types.callable.php" target="_blank">', '</a>'); ?></label>
51 </div>
52
53 <div class="form-group 404redirect-action" id="page-404redirect-action" style="display: <?php echo ($type === 'page_redirect' ? 'block' : 'none'); ?>;">
54 <label><?php echo __('Existing Page', 'advanced-access-manager'); ?></label>
55 <?php
56 wp_dropdown_pages(array(
57 'depth' => 99,
58 'selected' => isset($settings['redirect_page_id']) ? $settings['redirect_page_id'] : 0,
59 'echo' => 1,
60 'id' => '404redirect-page',
61 'class' => 'form-control',
62 'show_option_none' => __('-- Select Page --', 'advanced-access-manager')
63 ));
64 ?>
65 </div>
66
67 <div class="form-group 404redirect-action" id="url-404redirect-action" style="display: <?php echo ($type === 'url_redirect' ? 'block' : 'none'); ?>;">
68 <label><?php echo __('The URL', 'advanced-access-manager'); ?></label>
69 <input
70 type="text"
71 class="form-control"
72 placeholder="https://"
73 value="<?php echo stripslashes(esc_js(isset($settings['redirect_url']) ? $settings['redirect_url'] : '')); ?>"
74 />
75 </div>
76
77 <div class="form-group 404-redirect-action" id="callback-404redirect-action" style="display: <?php echo ($type === 'trigger_callback' ? 'block' : 'none'); ?>;">
78 <label><?php echo __('PHP Callback Function', 'advanced-access-manager'); ?></label>
79 <input
80 type="text"
81 class="form-control"
82 placeholder="Enter valid callback"
83 value="<?php echo stripslashes(esc_js(isset($settings['callback']) ? $settings['callback'] : '')); ?>"
84 />
85 </div>
86 </div>
87 </div>
88 </div>
89 <?php }