| Server IP : 43.130.17.34 / Your IP : 216.73.217.6 Web Server : nginx/1.28.0 System : Linux VM-4-12-opencloudos 6.6.92-34.1.oc9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 25 21:32:13 CST 2025 x86_64 User : www ( 1000) PHP Version : 8.0.26 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /www/wwwroot/yespkg.com/wp-content/plugins/wpforms/assets/js/admin/splash/ |
Upload File : |
/* global wpforms_splash_data */
/**
* WPForms What's New.
*
* @since 1.8.7
*/
const WPSplash = window.WPSplash || ( function( document, window, $ ) {
/**
* Public functions and properties.
*
* @since 1.8.7
*
* @type {Object}
*/
const app = {
/**
* Initialize.
*
* @since 1.8.7
*/
init() {
$( app.ready );
},
/**
* Document ready.
*
* @since 1.8.7
*/
ready() {
app.events();
if ( wpforms_splash_data.triggerForceOpen ) {
app.openModal();
}
},
/**
* Events.
*
* @since 1.8.7
*/
events() {
$( document )
.on( 'click', '.wpforms-splash-modal-open', function( e ) {
e.preventDefault();
app.openModal();
} );
},
/**
* Open the modal.
*
* @since 1.8.7
*/
openModal() {
$.alert( {
title: false,
content: wp.template( 'wpforms-splash-modal-content' )(),
icon: false,
closeIcon: true,
boxWidth: '1000px',
theme: 'modern',
useBootstrap: false,
scrollToPreviousElement: false,
buttons: false,
backgroundDismiss: true,
offsetTop: 50,
offsetBottom: 50,
animation: 'opacity',
closeAnimation: 'opacity',
animateFromElement: false,
onOpenBefore() {
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' );
setTimeout( () => {
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 );
}, 0 );
},
onOpen() {
$( '.jconfirm' ).css( 'bottom', 0 );
$( '.wpforms-dash-widget-welcome-block' ).remove();
app.dismissDashboardWidgetBanner();
},
onDestroy() {
$( 'body' )
.removeClass( 'wpforms-splash-modal' )
.css( '--wpforms-body-scrollbar-width', null );
},
} );
},
/**
* Dismiss the dashboard widget banner.
*
* @since 1.9.0
*/
dismissDashboardWidgetBanner() {
const data = {
_wpnonce: wpforms_splash_data.nonce,
action : 'wpforms_dash_widget_save_widget_meta',
meta: 'hide_welcome_block',
value: 1,
};
$.post( ajaxurl, data );
},
};
// Provide access to public functions/properties.
return app;
}( document, window, jQuery ) );
WPSplash.init();