Create a gist now

Instantly share code, notes, and snippets.

<?php
add_action( 'set_transient_my_transient', function( $value, $expiration ) {
$desired_expiration = 600;
if ( $expiration != $desired_expiration ) {
set_transient( 'my_transient', $value, $desired_expiration );
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment