File: //srv/htdocs/wp-content/plugins/host-webfonts-local/src/Compatibility/VisualComposer.php
<?php
/* * * * * * * * * * * * * * * * * * * * *
*
* ██████╗ ███╗ ███╗ ██████╗ ███████╗
* ██╔═══██╗████╗ ████║██╔════╝ ██╔════╝
* ██║ ██║██╔████╔██║██║ ███╗█████╗
* ██║ ██║██║╚██╔╝██║██║ ██║██╔══╝
* ╚██████╔╝██║ ╚═╝ ██║╚██████╔╝██║
* ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝
*
* @package : OMGF
* @author : Daan van den Bergh
* @copyright: © 2017 - 2025 Daan van den Bergh
* @url : https://daan.dev
* * * * * * * * * * * * * * * * * * * */
namespace OMGF\Compatibility;
use OMGF\Frontend\Process;
/**
* @codeCoverageIgnore because it depends on a 3rd party plugin.
*/
class VisualComposer {
/**
* Build class.
*/
public function __construct() {
$this->init();
}
/**
* Action/filter hooks.
*
* @return void
*/
private function init() {
add_filter( 'vc_get_vc_grid_data_response', [ $this, 'parse_vc_grid_data' ], 10, 1 );
}
/**
* @since v5.4.0 [OMGF-75] Parse HTML generated by Visual Composer's Grid elements, which is loaded async using AJAX.
* @filter vc_get_vc_grid_data_response
*
* @return string Valid HTML generated by Visual Composer.
*/
public function parse_vc_grid_data( $data ) {
static $processor = null;
if ( $processor === null ) {
$processor = new Process( true );
}
return $processor->parse( $data );
}
}