PluginProbe
Extendify / 3.1.5
Extendify v3.1.5
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 0.7.0 All 126 releases
extendify / app / Assist / Controllers / WPController.php

WPController.php in Extendify 3.1.5, at app/Assist/Controllers/WPController.php

36 lines 648 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * WP Controller
5 */
6
7 namespace Extendify\Assist\Controllers;
8
9 defined('ABSPATH') || die('No direct access.');
10
11 /**
12 * The controller for interacting with WordPress.
13 */
14
15 class WPController
16 {
17 /**
18 * Get the list of active plugins slugs
19 *
20 * @return \WP_REST_Response
21 */
22 public static function getActivePlugins()
23 {
24 $value = \get_option('active_plugins', null);
25 $slugs = [];
26 foreach ($value as $plugin) {
27 $slugs[] = explode('/', $plugin)[0];
28 }
29
30 return new \WP_REST_Response([
31 'success' => true,
32 'data' => $slugs,
33 ]);
34 }
35 }
36