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
capability.php
129 lines
| 1 | <?php /** @version 7.0.0 **/ ?> |
| 2 | |
| 3 | <?php if (defined('AAM_KEY')) { ?> |
| 4 | <div class="aam-feature" id="capability-content"> |
| 5 | <?php if (AAM::api()->config->get('core.settings.ui.tips')) { ?> |
| 6 | <div class="row"> |
| 7 | <div class="col-xs-12"> |
| 8 | <p class="aam-notification"> |
| 9 | <?php echo sprintf(AAM_Backend_View_Helper::preparePhrase('[Be careful!] On this tab, you can manage capabilities for [%s]. Any changes to the list of capabilities is [permanent]. Consider to backup at least your database tables [_options] and [_usermeta] regularly.', 'b', 'b', 'b', 'i', 'i'), AAM_Backend_AccessLevel::get_instance()->get_display_name()); ?> |
| 10 | </p> |
| 11 | </div> |
| 12 | </div> |
| 13 | <?php } ?> |
| 14 | |
| 15 | <div class="aam-feature-top-actions text-right"> |
| 16 | <div class="btn-group"> |
| 17 | <a href="#" class="btn btn-xs btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="capability-filter"> |
| 18 | <i class="icon-filter"></i> <?php echo __('Filter', 'advanced-access-manager'); ?> <span class="caret"></span> |
| 19 | </a> |
| 20 | <ul class="dropdown-menu" id="capability-groups" aria-labelledby="capability-filter"> |
| 21 | <li><a href="#" data-assigned="true"><?php echo __('All Assigned', 'advanced-access-manager'); ?></a></li> |
| 22 | <li><a href="#" data-unassigned="true"><?php echo __('All Unassigned', 'advanced-access-manager'); ?></a></li> |
| 23 | <li><a href="#" data-clear="true"><?php echo __('All Capabilities', 'advanced-access-manager'); ?></a></li> |
| 24 | </ul> |
| 25 | </div> |
| 26 | <a href="#" class="btn btn-xs btn-primary" id="add-capability"><i class="icon-plus"></i> <?php echo __('Create', 'advanced-access-manager'); ?></a> |
| 27 | </div> |
| 28 | |
| 29 | <table id="capability-list" class="table table-striped table-bordered"> |
| 30 | <thead> |
| 31 | <tr> |
| 32 | <th>ID</th> |
| 33 | <th width="80%"><?php echo __('Capability', 'advanced-access-manager'); ?></th> |
| 34 | <th><?php echo __('Actions', 'advanced-access-manager'); ?></th> |
| 35 | <th>Is Granted</th> |
| 36 | <th>Data</th> |
| 37 | </tr> |
| 38 | </thead> |
| 39 | <tbody></tbody> |
| 40 | </table> |
| 41 | |
| 42 | <div class="modal fade" id="add-capability-modal" tabindex="-1" role="dialog"> |
| 43 | <div class="modal-dialog modal-sm" role="document"> |
| 44 | <div class="modal-content"> |
| 45 | <div class="modal-header"> |
| 46 | <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', 'advanced-access-manager'); ?>"><span aria-hidden="true">×</span></button> |
| 47 | <h4 class="modal-title"><?php echo __('Create Capability', 'advanced-access-manager'); ?></h4> |
| 48 | </div> |
| 49 | <div class="modal-body"> |
| 50 | <p |
| 51 | id="add_capability_error" |
| 52 | class="text-left alert alert-warning hidden aam-mb-2" |
| 53 | data-message="<?php echo esc_attr(__('The "%s" capability does not adhere to the WordPress core standard, which recommends using only lowercase letters, numbers, underscores, and hyphens.', 'advanced-access-manager')); ?>" |
| 54 | ></p> |
| 55 | |
| 56 | <div class="form-group"> |
| 57 | <label for="new-capability-name"><?php echo __('Capability', 'advanced-access-manager'); ?><span class="aam-asterix">*</span></label> |
| 58 | <input type="text" class="form-control" id="new-capability-name" placeholder="<?php echo __('Enter Capability', 'advanced-access-manager'); ?>" /> |
| 59 | </div> |
| 60 | <div class="checkbox hidden" id="ignore_capability_format_container"> |
| 61 | <label for="ignore_capability_format"> |
| 62 | <input type="checkbox" id="ignore_capability_format" /> |
| 63 | <?php echo __('Ignore warning and create new capability anyway', 'advanced-access-manager'); ?> |
| 64 | </label> |
| 65 | </div> |
| 66 | </div> |
| 67 | <div class="modal-footer"> |
| 68 | <button type="button" class="btn btn-success" id="add-capability-btn"><?php echo __('Create', 'advanced-access-manager'); ?></button> |
| 69 | <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', 'advanced-access-manager'); ?></button> |
| 70 | </div> |
| 71 | </div> |
| 72 | </div> |
| 73 | </div> |
| 74 | |
| 75 | <div class="modal fade" id="update-capability-modal" tabindex="-1" role="dialog"> |
| 76 | <div class="modal-dialog modal-sm" role="document"> |
| 77 | <div class="modal-content"> |
| 78 | <div class="modal-header"> |
| 79 | <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', 'advanced-access-manager'); ?>"><span aria-hidden="true">×</span></button> |
| 80 | <h4 class="modal-title"><?php echo __('Update Capability', 'advanced-access-manager'); ?></h4> |
| 81 | </div> |
| 82 | <div class="modal-body"> |
| 83 | <p |
| 84 | id="update_capability_error" |
| 85 | class="text-left alert alert-warning hidden aam-mb-2" |
| 86 | data-message="<?php echo esc_attr(__('The "%s" capability does not adhere to the WordPress core standard, which recommends using only lowercase letters, numbers, underscores, and hyphens.', 'advanced-access-manager')); ?>" |
| 87 | ></p> |
| 88 | |
| 89 | <div class="form-group"> |
| 90 | <label for="capability-id"><?php echo __('Capability', 'advanced-access-manager'); ?><span class="aam-asterix">*</span></label> |
| 91 | <input type="text" class="form-control" id="update-capability-slug" placeholder="<?php echo __('Enter Capability', 'advanced-access-manager'); ?>" /> |
| 92 | </div> |
| 93 | <div class="checkbox hidden" id="ignore_update_capability_format_container"> |
| 94 | <label for="ignore_update_capability_format"> |
| 95 | <input type="checkbox" id="ignore_update_capability_format" /> |
| 96 | <?php echo __('Ignore warning and update capability anyway', 'advanced-access-manager'); ?> |
| 97 | </label> |
| 98 | </div> |
| 99 | </div> |
| 100 | <div class="modal-footer"> |
| 101 | <button type="button" class="btn btn-danger" id="update-capability-btn"><?php echo __('Update For All Roles', 'advanced-access-manager'); ?></button> |
| 102 | <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', 'advanced-access-manager'); ?></button> |
| 103 | </div> |
| 104 | </div> |
| 105 | </div> |
| 106 | </div> |
| 107 | |
| 108 | <div class="modal fade" id="delete-capability-modal" tabindex="-1" role="dialog"> |
| 109 | <div class="modal-dialog modal-sm" role="document"> |
| 110 | <div class="modal-content"> |
| 111 | <div class="modal-header"> |
| 112 | <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', 'advanced-access-manager'); ?>"><span aria-hidden="true">×</span></button> |
| 113 | <h4 class="modal-title"><?php echo __('Delete Capability', 'advanced-access-manager'); ?></h4> |
| 114 | </div> |
| 115 | <div class="modal-body"> |
| 116 | <p |
| 117 | class="text-center aam-confirm-message alert alert-danger" |
| 118 | data-message="<?php echo __('You are about to delete the %s capability. Any functionality relying on this capability will no longer be accessible.', 'advanced-access-manager'); ?>" |
| 119 | ></p> |
| 120 | </div> |
| 121 | <div class="modal-footer"> |
| 122 | <button type="button" class="btn btn-danger" id="delete-capability-btn"><?php echo __('Delete For All Roles', 'advanced-access-manager'); ?></button> |
| 123 | <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', 'advanced-access-manager'); ?></button> |
| 124 | </div> |
| 125 | </div> |
| 126 | </div> |
| 127 | </div> |
| 128 | </div> |
| 129 | <?php } |