Hello,
I have a shortcode in my plugin that loads CSS files using the following code:
When I run this shortcode with the
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 );
}
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