apply_filters( 'learndash_transients_disabled', boolean $transients_disabled, string $transient_key )
Filters whether the transients are disabled or not.
Description #
Parameters #
- $transients_disabled
-
(boolean) Whether the transients are disabled or not.
- $transient_key
-
(string) Transient Key.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php /** * Example usage for learndash_transients_disabled filter. */ add_filter( 'learndash_transients_disabled', function( $disabled, $key = '' ) { // Example disable using transient for the the key 'learndash_user_groups_1' if ( $key == 'learndash_user_groups_1' ) { $disabled = true; } return $disabled; }, 10, 2 );
Changelog #
Version | Description |
---|---|
2.3.3 | Introduced. |