AdvancedMathCaptcha.php
3 years ago
AeliaCurrencySwitcher.php
3 years ago
BeaverBuilder.php
4 years ago
CF_Helper.php
3 years ago
Cloudflare.php
2 years ago
CommonHelpers.php
3 years ago
CookieNotice.php
4 years ago
DownloadManager.php
4 years ago
Elementor.php
3 years ago
Ezoic.php
4 years ago
FusionBuilder.php
4 years ago
GeoTargetingWP.php
2 years ago
GravityForms.php
2 years ago
JetPackNP.php
3 years ago
NginxHelper.php
2 years ago
RC.php
3 years ago
RankMathNP.php
3 years ago
ShortPixel.php
4 years ago
SquirrlySEO.php
3 years ago
TheEventsCalendar.php
3 years ago
ThriveTheme.php
4 years ago
WCML.php
3 years ago
WPBakeryNP.php
3 years ago
WPCacheHelper.php
3 years ago
WPForms.php
3 years ago
WPRocket.php
4 years ago
Woocommerce.php
4 years ago
WoocommerceCacheHandler.php
4 years ago
YoastSEO.php
3 years ago
WPBakeryNP.php
30 lines
| 1 | <?php |
| 2 | |
| 3 | namespace NitroPack\Integration\Plugin; |
| 4 | |
| 5 | class WPBakeryNP { |
| 6 | |
| 7 | const STAGE = "late"; |
| 8 | public static function isActive() { |
| 9 | global $vc_manager; |
| 10 | |
| 11 | $activePlugins = apply_filters('active_plugins', get_option('active_plugins')); |
| 12 | if ($vc_manager || in_array( 'js_composer/js_composer.php', $activePlugins )) { |
| 13 | return true; |
| 14 | } |
| 15 | return false; |
| 16 | } |
| 17 | |
| 18 | public function init($stage) { |
| 19 | if ( ! WPBakeryNP::isActive() ) { |
| 20 | return; |
| 21 | } |
| 22 | |
| 23 | add_action('update_option_wpb_js_custom_css', array ($this, 'purge_cache_on_custom_css_update') ); |
| 24 | } |
| 25 | |
| 26 | public function purge_cache_on_custom_css_update() { |
| 27 | nitropack_sdk_purge(NULL, NULL, 'WPBakery Custom CSS Updated'); |
| 28 | } |
| 29 | |
| 30 | } |