PluginProbe
Extendify / trunk
Extendify vtrunk
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
← All changes | app/Assist/Controllers/GlobalsController.php +7 -6 0.11.1 → trunk View file →
@@ -1,5 +1,6 @@
1 1 <?php
2 +
2 3 /**
3 4 * Controls Global Settings
4 5 */
5 6
@@ -4,18 +5,18 @@
4 5 */
5 6
6 7 namespace Extendify\Assist\Controllers;
7 8
8 -if (!defined('ABSPATH')) {
9 - die('No direct access.');
10 -}
9 +defined('ABSPATH') || die('No direct access.');
11 10
11 +use Extendify\Shared\Services\Sanitizer;
12 +
12 13 /**
13 14 * The controller for plugin dependency checking, etc
14 15 */
16 +
15 17 class GlobalsController
16 18 {
17 -
18 19 /**
19 20 * Return the data
20 21 *
21 22 * @return \WP_REST_Response
@@ -33,9 +34,9 @@
33 34 * @return \WP_REST_Response
34 35 */
35 36 public static function store($request)
36 37 {
37 - $data = json_decode($request->get_param('data'), true);
38 - update_option('extendify_assist_globals', $data);
38 + $data = json_decode($request->get_param('state'), true);
39 + update_option('extendify_assist_globals', Sanitizer::sanitizeArray($data));
39 40 return new \WP_REST_Response($data);
40 41 }
41 42 }