| Server IP : 13.126.101.145 / Your IP : 216.73.217.47 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ip-11-115-0-196 6.8.0-1039-aws #41~22.04.1-Ubuntu SMP Thu Sep 11 10:54:48 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 8.3.17 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/rentals_updated/wp-content/mu-plugins/ |
Upload File : |
<?php defined( 'ABSPATH' ) or die();
define( 'burst_rest_api_optimizer', true );
if ( ! function_exists( 'burst_exclude_plugins_for_rest_api' ) ) {
/**
* Exclude all other plugins from the active plugins list if this is a Burst rest request
*
* @param array $plugins The active plugins.
*
* @return array The filtered active plugins.
*/
function burst_exclude_plugins_for_rest_api( $plugins ) {
// if not an rsp request return all plugins
// but for some requests, we need to load other plugins, to ensure we can detect them.
if ( isset( $_SERVER['REQUEST_URI'] ) && (
strpos( $_SERVER['REQUEST_URI'], 'burst/v1' ) === false ||
strpos( $_SERVER['REQUEST_URI'], 'otherpluginsdata' ) !== false ||
strpos( $_SERVER['REQUEST_URI'], 'plugin_actions' ) !== false ||
strpos( $_SERVER['REQUEST_URI'], 'fields/set' ) !== false
)
) {
return $plugins;
}
// Only leave burst and pro add ons active for this request
foreach ( $plugins as $key => $plugin ) {
if ( strpos( $plugin, 'burst-' ) !== false ) {
continue;
}
unset( $plugins[ $key ] );
}
return $plugins;
}
add_filter( 'option_active_plugins', 'burst_exclude_plugins_for_rest_api' );
}