first
This commit is contained in:
27
wp-content/plugins/shortpixel-image-optimiser/class/external/visualcomposer.php
vendored
Normal file
27
wp-content/plugins/shortpixel-image-optimiser/class/external/visualcomposer.php
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
<?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();
|
Reference in New Issue
Block a user