PluginProbe
RabbitLoader / 3.0.5
RabbitLoader v3.0.5
4.0.2 4.0.1 4.0 3.2.0 3.1.1 3.1.0 3.0.5 3.0.3 3.0.4 2.17.1 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.7 2.18.0 2.18.1 2.18.2 2.18.3 2.18.4 2.18.5 2.18.6 2.18.7 2.18.8 All 129 releases
rabbit-loader / inc / RabbitLoader / SDK / WordPress.php

WordPress.php in RabbitLoader 3.0.5, at inc/RabbitLoader/SDK/WordPress.php

31 lines 812 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace RabbitLoader\SDK;
4
5 class WordPress
6 {
7 public static function isWp()
8 {
9 return defined('ABSPATH') && function_exists('apply_filters') && function_exists('get_option');
10 }
11
12 public static function &plugins()
13 {
14 $plugins = [];
15 if (!self::isWp()) {
16 return $plugins;
17 }
18 $activePlugins = apply_filters('active_plugins', get_option('active_plugins'));
19 //Yoast SEO
20 if (class_exists('WPSEO_Options') || in_array('wordpress-seo/wp-seo.php', $activePlugins)) {
21 $plugins[] = "wordpress-seo";
22 }
23
24 //Rank Math
25 if (class_exists('RankMath') || in_array('seo-by-rank-math/rank-math.php', $activePlugins)) {
26 $plugins[] = "seo-by-rank-math";
27 }
28 return $plugins;
29 }
30 }
31