ConfigPress.php
7 years ago
Content.php
7 years ago
Core.php
7 years ago
Manager.php
7 years ago
Security.php
7 years ago
Content.php
64 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 content settings |
| 12 | * |
| 13 | * @package AAM |
| 14 | * @author Vasyl Martyniuk <vasyl@vasyltech.com> |
| 15 | */ |
| 16 | class AAM_Backend_Feature_Settings_Content extends AAM_Backend_Feature_Abstract { |
| 17 | |
| 18 | /** |
| 19 | * @inheritdoc |
| 20 | */ |
| 21 | public static function getTemplate() { |
| 22 | return 'settings/content.phtml'; |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * |
| 27 | * @return type |
| 28 | */ |
| 29 | protected function getList() { |
| 30 | $settings = array( |
| 31 | 'core.settings.mediaAccessControl' => array( |
| 32 | 'title' => __('Media Files Access Control', AAM_KEY), |
| 33 | 'descr' => sprintf(AAM_Backend_View_Helper::preparePhrase('Allow AAM to manage a physically access to all media files located in the defined by the system [uploads] folder. [Note!] This feature requires additional steps as described in %sthis article%s.', 'strong', 'strong'), '<a href="https://aamplugin.com/help/how-to-manage-wordpress-media-access" target="_blank">', '</a>'), |
| 34 | 'value' => AAM_Core_Config::get('core.settings.mediaAccessControl', false) |
| 35 | ), |
| 36 | 'core.settings.manageHiddenPostTypes' => array( |
| 37 | 'title' => __('Manage Hidden Post Types', AAM_KEY), |
| 38 | 'descr' => __('By default AAM allows you to manage access only to public post types on Posts & Terms tab. By enabling this feature, you also will be able to manage access to hidden post types like revisions, navigation menus or any other custom post types that are not registered as public.', AAM_KEY), |
| 39 | 'value' => AAM_Core_Config::get('core.settings.manageHiddenPostTypes', false) |
| 40 | ) |
| 41 | ); |
| 42 | |
| 43 | return apply_filters('aam-settings-filter', $settings, 'post'); |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Register Contact/Hire feature |
| 48 | * |
| 49 | * @return void |
| 50 | * |
| 51 | * @access public |
| 52 | */ |
| 53 | public static function register() { |
| 54 | AAM_Backend_Feature::registerFeature((object) array( |
| 55 | 'uid' => 'settings-content', |
| 56 | 'position' => 5, |
| 57 | 'title' => __('Content Settings', AAM_KEY), |
| 58 | 'capability' => 'aam_manage_settings', |
| 59 | 'type' => 'settings', |
| 60 | 'view' => __CLASS__ |
| 61 | )); |
| 62 | } |
| 63 | |
| 64 | } |