SILENT KILLERPanel

Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > forminator > admin > pages


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//ameliagraphics.com/wp-content/plugins/forminator/admin/pages

NameTypeSizeLast ModifiedActions
addons-page.php File 1690 bytes February 03 2025 17:11:02.
dashboard-page.php File 1190 bytes September 02 2024 15:32:28.
entries-page.php File 8041 bytes September 02 2024 15:32:28.
integrations-page.php File 4364 bytes September 02 2024 15:32:28.
reports-page.php File 8120 bytes May 07 2025 16:49:06.
settings-page.php File 8083 bytes March 17 2025 17:29:02.
templates-page.php File 2124 bytes September 02 2024 15:32:28.

Reading File: /home/codekrsu//ameliagraphics.com/wp-content/plugins/forminator/admin/pages/integrations-page.php

<?php
/**
 * Forminator Integrations Page
 *
 * @package Forminator
 */

if ( ! defined( 'ABSPATH' ) ) {
	die();
}

/**
 * Class Forminator_Integrations_Page
 *
 * @since 1.1
 */
class Forminator_Integrations_Page extends Forminator_Admin_Page {

	/**
	 * Addon list as array
	 *
	 * @var array
	 */
	public $addons_list = array();

	/**
	 * Connected addon list
	 *
	 * @var array
	 */
	public $addons_list_grouped_by_connected = array();

	/**
	 * Nonce
	 *
	 * @var string
	 */
	public $addon_nonce = '';

	/**
	 * Addon page
	 *
	 * @var array
	 */
	private $addon_page = array();

	/**
	 * Page action
	 *
	 * @var string
	 */
	public static $addon_nonce_page_action = 'forminator_addon_nonce_page';

	/**
	 * Executed Action before render the page
	 *
	 * @since 1.1
	 * @since 1.2 add extra section for addon
	 */
	public function before_render() {
		// cleanup addons on integrations page.
		Forminator_Integration_Loader::get_instance()->cleanup_activated_addons();

		$this->addons_list                      = forminator_get_registered_addons_list();
		$this->addons_list_grouped_by_connected = forminator_get_registered_addons_grouped_by_connected();

		Forminator_Integration_Admin_Ajax::get_instance()->generate_nonce();
		$this->addon_nonce = Forminator_Integration_Admin_Ajax::get_instance()->get_nonce();
		add_filter( 'forminator_data', array( $this, 'add_addons_js_data' ) );

		$this->validate_addon_page();
	}

	/**
	 * Add js data
	 *
	 * @param mixed $data Addon data to add.
	 * @return mixed
	 */
	public function add_addons_js_data( $data ) {
		if ( Forminator::is_addons_feature_enabled() ) {
			$data['addons']      = forminator_get_registered_addons_list();
			$data['addon_nonce'] = $this->addon_nonce;
		}

		return $data;
	}

	/**
	 * Render custom output of addon when validated
	 *
	 * @since 1.2
	 */
	protected function render_page_content() {
		if ( ! empty( $this->addon_page ) ) {
			// html output here are expected.
			echo $this->addon_page['output'];// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
		} else {
			parent::render_page_content();
		}
	}

	/**
	 * Render Addon title as header on addon page
	 *
	 * @since 1.2
	 */
	public function render_header() {
		if ( ! empty( $this->addon_page ) ) {
			?>
			<header class="sui-header">
				<h1 class="sui-header-title"><?php echo esc_html( $this->addon_page['title'] ); ?></h1>
				<div class="sui-actions-right">
					<?php if ( forminator_is_show_documentation_link() ) : ?>
						<a href="https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#integrations" target="_blank" class="sui-button sui-button-ghost">
							<i class="sui-icon-academy"></i> <?php esc_html_e( 'View Documentation', 'forminator' ); ?>
						</a>
					<?php endif; ?>
				</div>
			</header>
			<?php
		} else {
			parent::render_header();
		}
	}

	/**
	 * Nonce generation for addon page
	 *
	 * @since 1.2
	 * @return string
	 */
	public static function get_addon_page_nonce() {
		return wp_create_nonce( self::$addon_nonce_page_action );
	}

	/**
	 * Validate required query arg for displaying addon page
	 *
	 * @since 1.2
	 *
	 * @return bool
	 */
	public function validate_addon_page() {
		$nonce = Forminator_Core::sanitize_text_field( 'nonce' );
		if ( $nonce && ! wp_verify_nonce( $nonce, self::$addon_nonce_page_action ) ) {
			return false;
		}
		$query_args = $_GET;
		// main component.
		/**
		 * - slug : addon slug (eg. trello)
		 * - nonce: nonce validation
		 * - section: callback
		 */
		if ( isset( $query_args['nonce'] ) ) {
			unset( $query_args['nonce'] );
		}
		if ( ! isset( $query_args['slug'] ) ) {
			return false;
		}
		$slug = $query_args['slug'];
		unset( $query_args['slug'] );
		$addon = forminator_get_addon( $slug );
		if ( ! $addon ) {
			return false;
		}

		if ( ! isset( $query_args['section'] ) ) {
			return false;
		}
		$section = $query_args['section'];
		unset( $query_args['section'] );
		$callback = $addon->get_integration_section_callback( $section );// returned callback must be an array.

		if ( ! is_array( $callback ) ) {
			return false;
		}

		if ( ! is_callable( $callback ) ) {
			return false;
		}

		forminator_maybe_attach_addon_hook( $addon );

		$output = call_user_func( $callback, $query_args );

		$this->addon_page = array(
			'title'  => $addon->get_title(),
			'output' => $output,
		);

		return true;
	}
}

SILENT KILLER Tool