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
Manager.php
49 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 Utility manager |
| 12 | * |
| 13 | * @package AAM |
| 14 | * @author Vasyl Martyniuk <vasyl@vasyltech.com> |
| 15 | */ |
| 16 | class AAM_Backend_Feature_Settings_Manager extends AAM_Backend_Feature_Abstract { |
| 17 | |
| 18 | /** |
| 19 | * Save AAM utility options |
| 20 | * |
| 21 | * @return string |
| 22 | * |
| 23 | * @access public |
| 24 | */ |
| 25 | public function save() { |
| 26 | $param = AAM_Core_Request::post('param'); |
| 27 | $value = stripslashes(AAM_Core_Request::post('value')); |
| 28 | |
| 29 | AAM_Core_Config::set($param, $value); |
| 30 | |
| 31 | return wp_json_encode(array('status' => 'success')); |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Delete AAM utility options |
| 36 | * |
| 37 | * @return string |
| 38 | * |
| 39 | * @access public |
| 40 | */ |
| 41 | public function delete() { |
| 42 | $param = AAM_Core_Request::post('param'); |
| 43 | |
| 44 | AAM_Core_Config::delete($param); |
| 45 | |
| 46 | return wp_json_encode(array('status' => 'success')); |
| 47 | } |
| 48 | |
| 49 | } |