Uname:Linux cp196.maytech.vn 5.14.0-687.66.2.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 6 16:20:31 EST 2026 x86_64

Base Dir : /home2/dlsafepha/public_html

User : dlsafepha


403WebShell
403Webshell
Server IP : 103.249.100.196  /  Your IP : 216.73.216.194
Web Server : Apache
System : Linux cp196.maytech.vn 5.14.0-687.66.2.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 6 16:20:31 EST 2026 x86_64
User : dlsafepha ( 1078)
PHP Version : 8.2.36
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home2/dlsafepha/./www/wp-content/plugins/popup-maker/classes/Integration/Form/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home2/dlsafepha/./www/wp-content/plugins/popup-maker/classes/Integration/Form/NinjaForms.php
<?php
/**
 * Integration for NinjaForms Form
 *
 * @package   PopupMaker
 * @copyright Copyright (c) 2024, Code Atlantic LLC
 */

class PUM_Integration_Form_NinjaForms extends PUM_Abstract_Integration_Form {

	/**
	 * @var string
	 */
	public $key = 'ninjaforms';

	public function __construct() {
		add_action( 'ninja_forms_pre_process', [ $this, 'on_success_v2' ] );
		add_action( 'ninja_forms_after_submission', [ $this, 'on_success_v3' ] );
	}

	/**
	 * @return string
	 */
	public function label() {
		return 'Ninja Forms';
	}

	/**
	 * @return bool
	 */
	public function enabled() {
		return class_exists( 'Ninja_Forms' ) && ! ( version_compare( get_option( 'ninja_forms_version', '0.0.0' ), '3.0', '<' ) || get_option( 'ninja_forms_load_deprecated', false ) );
	}

	/**
	 * @return array
	 */
	public function get_forms() {
		return Ninja_Forms()->form()->get_forms();
	}

	/**
	 * @param string $id
	 *
	 * @return mixed
	 */
	public function get_form( $id ) {
		return Ninja_Forms()->form( $id )->get();
	}

	/**
	 * @return array
	 */
	public function get_form_selectlist() {
		$form_selectlist = [];

		$forms = $this->get_forms();

		foreach ( $forms as $form ) {
			$form_selectlist[ $form->get_id() ] = $form->get_setting( 'title' );
		}

		return $form_selectlist;
	}

	/**
	 * @global $ninja_forms_processing
	 */
	public function on_success_v2() {
		global $ninja_forms_processing;

		if ( ! self::should_process_submission() ) {
			return;
		}
		$popup_id = self::get_popup_id();
		self::increase_conversion( $popup_id );

		pum_integrated_form_submission(
			[
				'popup_id'      => $popup_id,
				'form_provider' => $this->key,
				'form_id'       => $ninja_forms_processing->get_form_ID(),
			]
		);
	}

	/**
	 * @param $form_data
	 */
	public function on_success_v3( $form_data ) {
		if ( ! self::should_process_submission() ) {
			return;
		}
		$popup_id = self::get_popup_id();
		self::increase_conversion( $popup_id );
		pum_integrated_form_submission(
			[
				'popup_id'      => $popup_id,
				'form_provider' => $this->key,
				'form_id'       => $form_data['form_id'],
			]
		);
	}

	/**
	 * @param array $js
	 *
	 * @return array
	 */
	public function custom_scripts( $js = [] ) {
		return $js;
	}

	/**
	 * @param array $css
	 *
	 * @return array
	 */
	public function custom_styles( $css = [] ) {
		return $css;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit