HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //home/mirz4654/www/wp-content/plugins/imagify/inc/3rd-party/formidable-pro/classes/Main.php
<?php
namespace Imagify\ThirdParty\FormidablePro;

defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' );

/**
 * Compat class for Formidable Forms Pro plugin.
 * Each call to `new WP_Query()` made by Imagify must have a `'is_imagify' => true` argument.
 *
 * @since  1.6.13
 * @author Grégory Viguier
 */
class Main {
	use \Imagify\Traits\InstanceGetterTrait;

	/**
	 * Class version.
	 *
	 * @var string
	 */
	const VERSION = '1.1';

	/**
	 * Set to true when the current query comes from Imagify.
	 *
	 * @var int
	 */
	protected $is_imagify;

	/**
	 * Launch the hooks.
	 *
	 * @since  1.6.13
	 * @author Grégory Viguier
	 */
	public function init() {
		add_action( 'parse_query',     array( $this, 'maybe_remove_media_library_filter' ) );
		add_action( 'posts_selection', array( $this, 'maybe_put_media_library_filter_back' ) );
	}

	/**
	 * Fires before the 'pre_get_posts' hook.
	 *
	 * @since  1.6.13
	 * @author Grégory Viguier
	 *
	 * @param object $wp_query The WP_Query instance (passed by reference).
	 */
	public function maybe_remove_media_library_filter( $wp_query ) {
		if ( ! empty( $wp_query->query_vars['is_imagify'] ) && class_exists( 'FrmProFileField' ) ) {
			$this->is_imagify = true;
			remove_action( 'pre_get_posts', 'FrmProFileField::filter_media_library', 99 );
		} else {
			$this->is_imagify = false;
		}
	}

	/**
	 * Fires after the 'pre_get_posts' hook.
	 *
	 * @since  1.6.13
	 * @author Grégory Viguier
	 */
	public function maybe_put_media_library_filter_back() {
		if ( $this->is_imagify ) {
			add_action( 'pre_get_posts', 'FrmProFileField::filter_media_library', 99 );
		}
	}
}