From 49a72a40f656e1197c84ace84a45d9881c71d8c5 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 10 Feb 2009 06:26:46 +0000 Subject: [PATCH] Add transient_* filter. see #9048 git-svn-id: https://develop.svn.wordpress.org/trunk@10533 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index c63fdb0b45..602e5b7485 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -662,11 +662,13 @@ function get_transient($transient) { global $_wp_using_ext_object_cache, $wpdb; if ( $_wp_using_ext_object_cache ) { - return wp_cache_get($transient, 'transient'); + $value = wp_cache_get($transient, 'transient'); } else { - $transient = '_transient_' . $wpdb->escape($transient); - return get_option($transient); + $transient_option = '_transient_' . $wpdb->escape($transient); + $value = get_option($transient_option); } + + return apply_filters('transient_' . $transient, $value); } /**