PluginProbe
Elementor Website Builder – more than just a page builder / 3.0.3
Elementor Website Builder – more than just a page builder v3.0.3
4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 All 454 releases
← All changes | modules/system-info/reporters/plugins.php +9 -5 4.3.1 → 3.0.3 View file →
@@ -1,9 +1,7 @@
1 1 <?php
2 2 namespace Elementor\Modules\System_Info\Reporters;
3 3
4 -use Elementor\Plugin;
5 -
6 4 if ( ! defined( 'ABSPATH' ) ) {
7 5 exit; // Exit if accessed directly.
8 6 }
9 7
@@ -14,9 +12,9 @@
14 12 * active plugins.
15 13 *
16 14 * @since 1.0.0
17 15 */
18 -class Plugins extends Base_Plugin {
16 +class Plugins extends Base {
19 17
20 18 /**
21 19 * Active plugins.
22 20 *
@@ -40,9 +38,15 @@
40 38 * @return array Active plugins.
41 39 */
42 40 private function get_plugins() {
43 41 if ( ! $this->plugins ) {
44 - $this->plugins = Plugin::$instance->wp->get_active_plugins()->all();
42 + // Ensure get_plugins function is loaded
43 + if ( ! function_exists( 'get_plugins' ) ) {
44 + include ABSPATH . '/wp-admin/includes/plugin.php';
45 + }
46 +
47 + $active_plugins = get_option( 'active_plugins' );
48 + $this->plugins = array_intersect_key( get_plugins(), array_flip( $active_plugins ) );
45 49 }
46 50
47 51 return $this->plugins;
48 52 }
@@ -71,9 +75,9 @@
71 75 *
72 76 * @return bool True if the site has active plugins, False otherwise.
73 77 */
74 78 public function is_enabled() {
75 - return (bool) $this->get_plugins();
79 + return ! ! $this->get_plugins();
76 80 }
77 81
78 82 /**
79 83 * Get active plugins report fields.