403Webshell
Server IP : 89.108.64.180  /  Your IP : 216.73.216.46
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux 89-108-64-180.cloudvps.regruhosting.ru 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : www-root ( 1010)
PHP Version : 8.0.30
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/omapart.ru/wp-content/plugins/motopress-hotel-booking/includes/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/omapart.ru/wp-content/plugins/motopress-hotel-booking/includes/fixes.php
<?php

namespace MPHB;

use \MPHB\Libraries\WP_Meta_Query;

class Fixes {

	const FIX_META_QUERY_FLAG = 'mphb_fix_meta_query';

	public function __construct(){
		add_filter( 'posts_clauses', array( $this, 'fixOldWPMetaQuery' ), 10, 2 );

		// Jetpack lightbox conflict fix
		add_filter( 'mphb_single_room_type_gallery_use_magnific', array( $this, 'disableLightboxWhenJetpackCarousel' ) );
	}

	/**
	 * Allow old wordpress (<4.1) support complex meta query
	 *
	 * @global WPDB $wpdb
	 * @param array $pieces
	 * @param \WP_Query $wp_query
	 * @return array
	 */
	public function fixOldWPMetaQuery( $pieces, $wp_query ){
		global $wpdb;
		if ( $wp_query->get( self::FIX_META_QUERY_FLAG ) ) {
			$metaQuery = $wp_query->get( 'mphb_meta_query' );
			if ( !empty( $metaQuery ) ) {

				$metaQueryObj = new WP_Meta_Query\WP_Meta_Query( $metaQuery );

				$clauses = $metaQueryObj->get_sql( 'post', $wpdb->posts, 'ID', $wp_query );

				$pieces['join'] .= $clauses['join'];
				$pieces['where'] .= $clauses['where'];
				$pieces['groupby'] = "{$wpdb->posts}.ID";
			}
		}

		return $pieces;
	}

	/**
	 *
	 * @param bool $useMagnific
	 * @return bool
	 */
	public function disableLightboxWhenJetpackCarousel( $useMagnific ){

		if ( class_exists( 'Jetpack' ) && class_exists( 'Jetpack_Carousel' ) && in_array( 'carousel', \Jetpack::get_active_modules() ) ) {
			return false;
		}

		return $useMagnific;
	}

}

Youez - 2016 - github.com/yon3zu
LinuXploit