| Server IP : 54.36.91.62 / Your IP : 216.73.216.15 Web Server : Apache System : Linux webm021.cluster127.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : uxhactp ( 169076) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/uxhactp/www/wp-content/plugins/imagify/inc/3rd-party/formidable-pro/classes/ |
Upload File : |
<?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 );
}
}
}