Add pre_transient filter
git-svn-id: https://develop.svn.wordpress.org/trunk@10862 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
76b036f33b
commit
9a238639a4
@ -662,6 +662,10 @@ function delete_transient($transient) {
|
|||||||
function get_transient($transient) {
|
function get_transient($transient) {
|
||||||
global $_wp_using_ext_object_cache, $wpdb;
|
global $_wp_using_ext_object_cache, $wpdb;
|
||||||
|
|
||||||
|
$pre = apply_filters( 'pre_transient_' . $transient, false );
|
||||||
|
if ( false !== $pre )
|
||||||
|
return $pre;
|
||||||
|
|
||||||
if ( $_wp_using_ext_object_cache ) {
|
if ( $_wp_using_ext_object_cache ) {
|
||||||
$value = wp_cache_get($transient, 'transient');
|
$value = wp_cache_get($transient, 'transient');
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user