• Resolved timh1987

    (@timh1987)


    Hi

    Our developer is attempting to turn some custom code into an ESI Block, so that it renders with user-specific information in an otherwise vary groups public cached page.

    We have some confusion in your API docs regarding how you define the ESI Block name, so that it can then be called using

    apply_filters( 'litespeed_esi_url', 'my_esi_block', 'Custom ESI block' );

    Is this achieved by using the custom function name in place of whereever my_esi_block is used in the example? So, if the function (in the theme functions.php) was called ‘our_name’ it would look like this:

    function our_name_esi_load()
    {
    do_action( 'litespeed_control_set_ttl', 300 );
    //the custom function
    }

    and then called via

    apply_filters( 'litespeed_esi_url', 'our_name', 'Custom text of our choice' );

    Any clarification you can give would be greatly appreciiated.

    Thanks!

    • This topic was modified 1 year, 5 months ago by timh1987.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Clarification on ESI API’ is closed to new replies.