Bootstrap conflict with Download Manager
Download Manager plugin loads its bootstrap file on uwp pages, and later than uwp.
/**
* Prevents Download manager to load bootstrap on uwp pages.
*/
add_filter( 'wpdm_disable_scripts', 'gdsnippet_maybe_dequeue_wpdm_bootstrap', 999, 1 );
functiongdsnippet_maybe_dequeue_wpdm_bootstrap( $disabled_scripts ) {
if ( !is_array( $disabled_scripts ) ) {
$disabled_scripts= [];
}
// Bail early checks.
if (
in_array( 'wpdm-frontend-js', $disabled_scripts, true ) ||
!function_exists( 'is_uwp_page' ) ||
!is_uwp_page()
)
{
return $disabled_scripts;
}
$disabled_scripts[] ='wpdm-frontend-js';
return $disabled_scripts;
}