: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
toggleTagsColumn: function() {
$( '.wpforms-tags-filter, .wpforms-manage-tags, .bulkactions option[value="edit_tags"]' )
! $( this ).is( ':checked' ) ||
wpforms_admin_forms_overview.all_tags_choices.length === 0
* Click on the Cancel button in the Bulk Edit Tags form.
cancelBulkEditTagsClick: function() {
el.$bulkEditTagsRows.addClass( 'wpforms-hidden' );
* Click on the Save button in the Bulk Edit Tags form.
* @param {object} event Event object.
saveBulkEditTagsClick: function( event ) {
$spinner = $btn.find( '.wpforms-loading-spinner' ),
forms: el.$bulkEditTagsForms.data( 'choicesjs' ).getValue( true ),
tags: app.getTagsValue( el.$bulkEditTagsTags.data( 'choicesjs' ) ),
$spinner.removeClass( 'wpforms-hidden' );
$( '#the-list .tags.column-tags' ).each( function() {
$columnLinks = $td.find( '.wpforms-column-tags-links' ),
formID = $columnLinks.data( 'form-id' ) + '',
$select = $td.find( '.wpforms-column-tags-form select' ),
choicesObj = $select.data( 'choicesjs' );
if ( data.forms.indexOf( formID ) < 0 ) {
$columnLinks.data( 'tags', res.data.tags_ids );
// Update tags links in the column.
$columnLinks.find( '.wpforms-column-tags-links-list' ).html( res.data.tags_links );
// Update tags options in still not converted selects.
$select.html( res.data.tags_options );
wpforms_admin_forms_overview.all_tags_choices,
.setChoiceByValue( res.data.tags_ids.split( ',' ) );
$spinner.addClass( 'wpforms-hidden' );
el.$bulkEditTagsRows.addClass( 'wpforms-hidden' );
* Add custom item to Tags dropdown on input.
* @param {object} event Event object.
addCustomItemInput: function( event ) {
if ( [ 'Enter', ',' ].indexOf( event.key ) < 0 ) {
var $select = $( this ).closest( '.choices' ).find( 'select' ),
choicesObj = $select.data( 'choicesjs' );
if ( ! choicesObj || event.target.value.length === 0 ) {
var tagLabel = _.escape( event.target.value ).trim(),
labels = _.map( choicesObj.getValue(), 'label' ).map( function( label ) {
return label.toLowerCase().trim();
if ( tagLabel === '' || labels.indexOf( tagLabel.toLowerCase() ) >= 0 ) {
app.addCustomItemInputTag( choicesObj, tagLabel );
* Add custom item to Tags dropdown on input (second part).
* @param {object} choicesObj Choices.js instance.
* @param {object} tagLabel Event object.
addCustomItemInputTag: function( choicesObj, tagLabel ) {
var tag = _.find( wpforms_admin_forms_overview.all_tags_choices, { label: tagLabel } );
if ( tag && tag.value ) {
choicesObj.setChoiceByValue( tag.value );
// Provide access to public functions/properties.
}( document, window, jQuery ) );
WPFormsForms.Overview.init();