HEX
Server: Apache/2.4.65 (Debian)
System: Linux wordpress-7cb4c6b6f6-qgbk2 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
User: www-data (33)
PHP: 8.3.27
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/jet-engine/includes/compatibility/packages/layout-switcher.php
<?php
/**
 * Relevanssi compatibility package
 */

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
	die;
}

if ( ! class_exists( 'Jet_Engine_Layout_Switcher_Package' ) ) {

	/**
	 * Define Jet_Engine_Relevanssi_Package class
	 */
	class Jet_Engine_Layout_Switcher_Package {

		public function __construct() {
			//https://github.com/Crocoblock/issues-tracker/issues/14298
			//temporary fix for the issue with layout switcher
			add_filter( 'jet-engine/listing/dynamic-widget/has-inner-wrapper', array( $this, 'ensure_wrapper' ), 10, 2 );
		}

		public function ensure_wrapper( $has_wrapper, $widget ) {
			if ( $widget->get_name() === 'jet-listing-grid' ) {
				return true;
			}

			return $has_wrapper;
		}

	}

}

new Jet_Engine_Layout_Switcher_Package();