| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/WPCAFE/wp-content/plugins/jetpack-boost/compatibility/ |
Upload File : |
<?php
/**
* Compatibility functions for Divi Builder
*
* @package automattic/jetpack-boost
*/
namespace Automattic\Jetpack_Boost\Compatibility\Divi;
/**
* Defer JS can break Divi Builder.
*/
function disable_defer_js_for_divi_builder( $should_defer_js ) {
$is_divi_builder = filter_input( INPUT_GET, 'et_fb', FILTER_VALIDATE_INT );
if ( 1 === (int) $is_divi_builder ) {
return false;
}
$is_divi_preview = filter_input(
INPUT_GET,
'et_pb_preview',
FILTER_VALIDATE_BOOLEAN,
array(
'flags' => FILTER_NULL_ON_FAILURE,
)
);
if ( true === $is_divi_preview ) {
return false;
}
if ( function_exists( 'is_et_pb_preview' ) ) {
/** @phan-suppress-next-line PhanUndeclaredFunction */
if ( \is_et_pb_preview() ) {
return false;
}
}
return $should_defer_js;
}
add_filter( 'jetpack_boost_should_defer_js', __NAMESPACE__ . '\disable_defer_js_for_divi_builder' );