Core.php
84 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * ====================================================================== |
| 5 | * LICENSE: This file is subject to the terms and conditions defined in * |
| 6 | * file 'license.txt', which is part of this source code package. * |
| 7 | * ====================================================================== |
| 8 | */ |
| 9 | |
| 10 | /** |
| 11 | * Backend core settings |
| 12 | * |
| 13 | * @package AAM |
| 14 | * @author Vasyl Martyniuk <vasyl@vasyltech.com> |
| 15 | */ |
| 16 | class AAM_Backend_Feature_Settings_Core extends AAM_Backend_Feature_Abstract { |
| 17 | |
| 18 | /** |
| 19 | * @inheritdoc |
| 20 | */ |
| 21 | public static function getTemplate() { |
| 22 | return 'settings/core.phtml'; |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * |
| 27 | * @return type |
| 28 | */ |
| 29 | protected function getList() { |
| 30 | $settings = array( |
| 31 | 'manage-capability' => array( |
| 32 | 'title' => __('Edit/Delete Capabilities', AAM_KEY), |
| 33 | 'descr' => AAM_Backend_View_Helper::preparePhrase('Allow to edit or delete any existing capability on the Capabilities tab. [Warning!] For experienced users only. Changing or deleting capability may result in loosing access to some features or the entire website.', 'b'), |
| 34 | 'value' => AAM_Core_Config::get('manage-capability', false) |
| 35 | ), |
| 36 | 'backend-access-control' => array( |
| 37 | 'title' => __('Backend Access Control', AAM_KEY), |
| 38 | 'descr' => __('Allow AAM to manage access to the backend. Keep this option disabled if there is no needs to restrict backend features for other users. This option may reduce your website backend performance.', AAM_KEY), |
| 39 | 'value' => AAM_Core_Config::get('backend-access-control', true) |
| 40 | ), |
| 41 | 'frontend-access-control' => array( |
| 42 | 'title' => __('Frontend Access Control', AAM_KEY), |
| 43 | 'descr' => __('Allow AAM to manage access to frontend resources. If there is no need to manage access to the website frontend then keep this option unchecked as it may increase your webiste performance.', AAM_KEY), |
| 44 | 'value' => AAM_Core_Config::get('frontend-access-control', true) |
| 45 | ), |
| 46 | 'render-access-metabox' => array( |
| 47 | 'title' => __('Render Access Manager Metabox', AAM_KEY), |
| 48 | 'descr' => __('Render Access Manager metabox on all post and category edit pages. Access Manager metabox is the quick way to manage access to any post or category without leaving an edit page.', AAM_KEY), |
| 49 | 'value' => AAM_Core_Config::get('render-access-metabox', true), |
| 50 | ), |
| 51 | 'show-access-link' => array( |
| 52 | 'title' => __('Render Access Link', AAM_KEY), |
| 53 | 'descr' => __('Render Access shortcut link under any post, page, custom post type, category, custom taxonomy title or user name.', AAM_KEY), |
| 54 | 'value' => AAM_Core_Config::get('show-access-link', true), |
| 55 | ), |
| 56 | 'secure-login' => array( |
| 57 | 'title' => __('Secure Login', AAM_KEY), |
| 58 | 'descr' => __('AAM comes with its own user login handler. With this feature you can add AJAX login widget to your frontend page that significantly enhance your website security.', AAM_KEY), |
| 59 | 'value' => AAM_Core_Config::get('secure-login', true) |
| 60 | ) |
| 61 | ); |
| 62 | |
| 63 | return apply_filters('aam-settings-filter', $settings, 'core'); |
| 64 | } |
| 65 | |
| 66 | /** |
| 67 | * Register Contact/Hire feature |
| 68 | * |
| 69 | * @return void |
| 70 | * |
| 71 | * @access public |
| 72 | */ |
| 73 | public static function register() { |
| 74 | AAM_Backend_Feature::registerFeature((object) array( |
| 75 | 'uid' => 'settings-core', |
| 76 | 'position' => 1, |
| 77 | 'title' => __('Core Settings', AAM_KEY), |
| 78 | 'capability' => 'aam_manage_settings', |
| 79 | 'type' => 'settings', |
| 80 | 'view' => __CLASS__ |
| 81 | )); |
| 82 | } |
| 83 | |
| 84 | } |