: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
* Integrations for ninja-forms actions close popup
* @copyright Copyright (c) 2023, Code Atlantic LLC
if ( ! defined( 'ABSPATH' ) ) {
* Class NF_Action_SuccessMessage
final class NF_PUM_Actions_ClosePopup extends NF_Abstracts_Action {
protected $_name = 'closepopup';
protected $_timing = 'late';
protected $_priority = 10;
public function __construct() {
$this->_nicename = __( 'Close Popup', 'popup-maker' );
'label' => __( 'Delay', 'popup-maker' ) . ' (' . __( 'seconds', 'popup-maker' ) . ')',
'value' => __( '0', 'popup-maker' ),
$this->_settings = array_merge( $this->_settings, $settings );
public function save( $action_settings ) {
public function process( $action_settings, $form_id, $data ) {
if ( ! isset( $data['actions'] ) || ! isset( $data['actions']['closepopup'] ) ) {
$data['actions']['closepopup'] = true;
if ( isset( $action_settings['close_delay'] ) ) {
$data['actions']['closedelay'] = intval( $action_settings['close_delay'] );
if ( strlen( $data['actions']['closedelay'] ) >= 3 ) {
$data['actions']['closedelay'] = $data['actions']['closedelay'] / 1000;
$data['actions']['closepopup'] = $data['actions']['closedelay'];