: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
/* global wpforms_splash_data */
const WPSplash = window.WPSplash || ( function( document, window, $ ) {
* Public functions and properties.
if ( wpforms_splash_data.triggerForceOpen ) {
.on( 'click', '.wpforms-splash-modal-open', function( e ) {
content: wp.template( 'wpforms-splash-modal-content' )(),
scrollToPreviousElement: false,
closeAnimation: 'opacity',
animateFromElement: false,
const scrollbarWidth = ( window.innerWidth - document.body.clientWidth ) + 'px';
$( 'body' ).addClass( 'wpforms-splash-modal' )
.css( '--wpforms-body-scrollbar-width', scrollbarWidth );
$( '.wpforms-challenge-popup-container' ).addClass( 'wpforms-invisible' );
if ( navigator.userAgent.includes( 'Safari' ) && ! navigator.userAgent.includes( 'Chrome' ) ) {
$( 'html, body' ).animate( { scrollTop: 0 }, 0 );
$( '.jconfirm-box-container' ).css( 'padding-top', '50px' ).animate( { opacity: 1 }, 30 );
$( '.jconfirm' ).css( 'bottom', 0 );
$( 'body' ).removeClass( 'wpforms-splash-modal' )
.css( '--wpforms-body-scrollbar-width', null );
// Provide access to public functions/properties.
}( document, window, jQuery ) );