HEX
Server: Apache/2.4.57 (Unix) OpenSSL/1.1.1w
System: Linux server.mediaphic.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: efhamali (1088)
PHP: 7.3.33
Disabled: exec,passthru,shell_exec,system,show_source,mail,sendmail,popen,symlink,phpinfo
Upload Files
File: /home/efhamali/public_html/wp-content/plugins/ninja-forms/includes/Actions/Custom.php
<?php if ( ! defined( 'ABSPATH' ) ) exit;

/**
 * Class NF_Action_Custom
 */
final class NF_Actions_Custom extends NF_Abstracts_Action
{
    /**
     * @var string
     */
    protected $_name  = 'custom';

    /**
     * @var array
     */
    protected $_tags = array();

    /**
     * @var string
     */
    protected $_timing = 'normal';

    /**
     * @var int
     */
    protected $_priority = 10;

    /**
     * Constructor
     */
    public function __construct()
    {
        parent::__construct();

        $this->_nicename = esc_html__( 'WP Hook', 'ninja-forms' );

        $settings = Ninja_Forms::config( 'ActionCustomSettings' );

        $this->_settings = array_merge( $this->_settings, $settings );
    }

    /*
    * PUBLIC METHODS
    */

    public function save( $action_settings )
    {

    }

    public function process( $action_settings, $form_id, $data )
    {
        if( isset( $action_settings[ 'tag' ] ) ) {
            ob_start(); // Use the Output Buffer to suppress output

            do_action($action_settings[ 'tag' ], $data);

            ob_end_clean();
        }

        return $data;
    }
}