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:

functions.php
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.

  1. LiteSpeed Cache icon LiteSpeed Cache7+ million installs do_action( 'litespeed_control_set_ttl', $ttl, "WooCommerce set scheduled TTL to $ttl" ) thirdparty/woocommerce.cls.php:547
  2. Uncanny Automator icon 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
  3. Bulk Page Generator icon Bulk Page Generator3,000+ installs do_action( 'litespeed_control_set_ttl', $ttl ) src/service/image_endpoint/ImageEndpoint.php:384
  4. Smalk AI Analytics icon Smalk AI Analytics50+ installs do_action( 'litespeed_control_set_ttl', $ttl ) includes/ads/ads-pro-core.php:2939
  5. WP Blast icon WP Blast20+ installs do_action( 'litespeed_control_set_ttl', $expire ) inc/third-party/litespeed-cache/litespeed-cache-functions.php:18
  6. AstroWay icon AstroWay10+ installs do_action( 'litespeed_control_set_ttl', $seconds ) includes/class-page-cache.php:105
  7. Ramassio icon RamassioFewer than 10 installs do_action( 'litespeed_control_set_ttl', HOUR_IN_SECONDS ) includes/class-ramassio-frontend.php:46
  8. Performance Optimisation icon Performance OptimisationFewer than 10 installs do_action( 'litespeed_control_set_ttl', $ttl ) includes/Integrations/class-litespeed-integration.php:2014
  9. TurnKey Directories icon TurnKey DirectoriesFewer than 10 installs do_action( 'litespeed_control_set_ttl', $wanted ) includes/class-turnkeydir-mapillary-api.php:4640
  10. SCP Dynamics ESI Bridge icon SCP Dynamics ESI BridgeFewer than 10 installs do_action( 'litespeed_control_set_ttl', 0 ) includes/class-scp-jef-core.php:818
  11. BrikFront Page Builder for WooCommerce: Wishlist, Quick View, Variation Swatches & Side Cart icon 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
  12. Nik Zoroastrian Calendar & Events icon 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.