: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
$flyoutMenu.addClass( 'opened' );
$sullie.attr( 'src', menu.srcActive );
// Page elements and other values.
var $wpfooter = $( '#wpfooter' );
if ( $wpfooter.length === 0 ) {
'#wpforms-entries-list, ' +
'#wpforms-tools.wpforms-tools-tab-action-scheduler, ' +
'#wpforms-tools.wpforms-tools-tab-logs'
// Hide menu if scrolled down to the bottom of the page.
$( window ).on( 'resize scroll', _.debounce( function( e ) {
var wpfooterTop = $wpfooter.offset().top,
wpfooterBottom = wpfooterTop + $wpfooter.height(),
overlapBottom = $overlap.length > 0 ? $overlap.offset().top + $overlap.height() + 85 : 0,
viewTop = $( window ).scrollTop(),
viewBottom = viewTop + $( window ).height();
if ( wpfooterBottom <= viewBottom && wpfooterTop >= viewTop && overlapBottom > viewBottom ) {
$flyoutMenu.addClass( 'out' );
$flyoutMenu.removeClass( 'out' );
$( window ).trigger( 'scroll' );
// Use `data-lity-srcset` opener's attribute for add srcset to full image in opened lightbox.
$( document ).on( 'lity:ready', function( event, instance ) {
var $el = instance.element(),
$opener = instance.opener(),
srcset = typeof $opener !== 'undefined' ? $opener.data( 'lity-srcset' ) : '';
if ( typeof srcset !== 'undefined' && srcset !== '' ) {
$el.find( '.lity-content img' ).attr( 'srcset', srcset );
//--------------------------------------------------------------------//
//--------------------------------------------------------------------//
* Return if the target nodeName is a form element.
isFormTypeNode: function( name ) {
if ( 'TEXTAREA' === name || 'INPUT' === name || 'SELECT' === name ) {
* Get query string in a URL.
getQueryString: function( name ) {
var match = new RegExp( '[?&]' + name + '=([^&]*)' ).exec( window.location.search );
return match && decodeURIComponent( match[1].replace( /\+/g, ' ' ) );
if ( WPFormsAdmin.isDebug() ) {
if ( typeof msg === 'object' || msg.constructor === Array ) {
console.log( 'WPForms Debug:' );
console.log( 'WPForms Debug: ' + msg );
return ( window.location.hash && '#wpformsdebug' === window.location.hash );
* Get Delete / Trash all notice message.
* @param {string} type Type of screen.
* @return {Object} Notice Data object.
getDeleteAllNoticeData: ( type = '' ) => {
// if is trash page show delete data.
if ( 'trash' === type ) {
contentAll : wpforms_admin.entry_delete_all_confirm,
content : wpforms_admin.entry_delete_n_confirm,
// If not return trash data.
contentAll : wpforms_admin.entry_trash_all_confirm,
content : wpforms_admin.entry_trash_n_confirm,
* Show/hide the right arrow for the scrollable menu on mobile devices.
$( document ).on( 'wpformsReady', function() {
const $menu = $( '.wpforms-admin-tabs' );
const $lastMenuItem = $menu.find( 'li:last-child' );
// The last item of the menu is not visible - show the right arrow as an indicator of a scrollable menu.
if ( ! wpf.isInViewport( $lastMenuItem ) ) {
$menu.addClass( 'wpforms-admin-tabs--scrollable' );
// Listen to `scroll` event in order to hide the right arrow when the last item is visible.
$menu.on( 'scroll', function() {
$menu.toggleClass( 'wpforms-admin-tabs--scrollable', ! wpf.isInViewport( $lastMenuItem ) );
window.WPFormsAdmin = WPFormsAdmin;