ESI – litespeed_esi_url back HTML comment tag in code
-
Hi.
I have this code on my page
echo apply_filters( ‘litespeed_esi_url’, ‘address_cookie’, ‘Custom address cookie ESI block’ );
In my functions.php I have this
add_action( ‘litespeed_esi_load-address_cookie’, ‘address_cookie_esi_load’ );
function address_cookie_esi_load()
{
do_action( ‘litespeed_control_set_nocache’ );
echo $_COOKIE[‘address’];
}
I got value from $_COOKIE but in my code I have this
<!–lscwp Custom address cookie ESI block –>COOKIE value<!–uncached by LiteSpeed Cache 5.4 on 2023-04-21 15:34:03 –><!–X-LiteSpeed-Cache-Control: no-cache–><!–lscwp Custom address cookie ESI block esi end —>
I need only cookie value, without this comment tags, because I’m using this in inline JS in that page.
Thanks
Darko
The topic ‘ESI – litespeed_esi_url back HTML comment tag in code’ is closed to new replies.