wp_back/wp-content/plugins/shortpixel-image-optimiser/class/external/visualcomposer.php
2024-05-20 15:37:46 +03:00

28 lines
549 B
PHP

<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
// Visual Composer and compat class.
class visualComp
{
public function __construct()
{
add_filter('shortpixel/init/automedialibrary', array($this, 'check_vcinline'));
}
// autolibrary should not do things when VC is being inline somewhere.
public function check_vcinline($bool)
{
if ( function_exists( 'vc_action' ) && vc_action() == 'vc_inline' )
return false;
else
return $bool;
}
} // Class
$vc = new visualComp();