WordPress action hook
litespeed_control_set_ttl
Fired by 12 WordPress plugins, running on 7M+ sites between them.
How to use litespeed_control_set_ttl
It's an action: your callback runs at that point and receives 1 argument. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'litespeed_control_set_ttl', function( $ttl ) {
// Your code runs here.
}, 10, 1 );Argument names come from Bulk Page Generator's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
12 plugins that fire litespeed_control_set_ttl
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
LiteSpeed Cache7+ million installs
do_action( 'litespeed_control_set_ttl', $ttl, "WooCommerce set scheduled TTL to $ttl" )thirdparty/woocommerce.cls.php:547 -
Uncanny Automator40,000+ installs
do_action( 'litespeed_control_set_ttl', max( 0, $seconds ) )src/app/Transports/Model_Context_Protocol/OAuth/Server/OAuth_Cache_Policy.php:35 -
Bulk Page Generator3,000+ installs
do_action( 'litespeed_control_set_ttl', $ttl )src/service/image_endpoint/ImageEndpoint.php:384 -
Smalk AI Analytics50+ installs
do_action( 'litespeed_control_set_ttl', $ttl )includes/ads/ads-pro-core.php:2939 -
WP Blast20+ installs
do_action( 'litespeed_control_set_ttl', $expire )inc/third-party/litespeed-cache/litespeed-cache-functions.php:18 -
AstroWay10+ installs
do_action( 'litespeed_control_set_ttl', $seconds )includes/class-page-cache.php:105 -
RamassioFewer than 10 installs
do_action( 'litespeed_control_set_ttl', HOUR_IN_SECONDS )includes/class-ramassio-frontend.php:46 -
Performance OptimisationFewer than 10 installs
do_action( 'litespeed_control_set_ttl', $ttl )includes/Integrations/class-litespeed-integration.php:2014 -
TurnKey DirectoriesFewer than 10 installs
do_action( 'litespeed_control_set_ttl', $wanted )includes/class-turnkeydir-mapillary-api.php:4640 -
SCP Dynamics ESI BridgeFewer than 10 installs
do_action( 'litespeed_control_set_ttl', 0 )includes/class-scp-jef-core.php:818 -
BrikFront Page Builder for WooCommerce: Wishlist, Quick View, Variation Swatches & Side CartFewer than 10 installs
do_action( 'litespeed_control_set_ttl', $seconds, 'BrikFront' )includes/kit/class-rest.php:176 -
Nik Zoroastrian Calendar & EventsFewer than 10 installs
do_action( 'litespeed_control_set_ttl', $ttl )includes/class-zc-cache.php:28
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.