Created
April 23, 2019 13:13
-
-
Save jchristopher/9df63a1d26dc75cef326389b375940aa to your computer and use it in GitHub Desktop.
Modify SearchWP TTL for Dashboard Widget transient
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'searchwp_dashboard_widget_transient_ttl', function( $duration ) { | |
// Only store Dashboard Widget data as transient for 1 hour (instead of default 12). | |
return HOUR_IN_SECONDS; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment