wp_enqueue_style not work with ESI

#1
Hello,
I have a shortcode in my plugin that loads CSS files using the following code:
Code:
if (!defined('MY_PLUGIN_URL')) define ('MY_PLUGIN_URL', plugin_dir_path(__FILE__));
if (!defined('MY_PLUGIN_BASE')) define ('MY_PLUGIN_BASE', plugin_dir_url(__FILE__));

$styles = array(
'tgl' => 'assets/css/tgl.min.css',
);

foreach( $styles as $k => $v ){
$r = wp_register_style( $k, MY_PLUGIN_BASE.$v );
$r = wp_enqueue_style( $k );
}
When I run this shortcode with the do_shortcode() function it loads the css files, but when I use it with the esi option like this: [esi su_user_account_edit ttl="0"] it doesn't load the css files at all
 
#7
How should forum software know what you are looking for? This forum is not only about cache plugin for WP!
You're right, basically I've been using it for a few years now and just today I ran into a glitch for the first time and that's why I came here. It will take me some time to learn the structure of this huge forum...
 
Top