Add transient_* filter. see #9048

git-svn-id: https://develop.svn.wordpress.org/trunk@10533 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-02-10 06:26:46 +00:00
parent c85b18238a
commit 49a72a40f6
1 changed files with 5 additions and 3 deletions

View File

@ -662,11 +662,13 @@ function get_transient($transient) {
global $_wp_using_ext_object_cache, $wpdb; global $_wp_using_ext_object_cache, $wpdb;
if ( $_wp_using_ext_object_cache ) { if ( $_wp_using_ext_object_cache ) {
return wp_cache_get($transient, 'transient'); $value = wp_cache_get($transient, 'transient');
} else { } else {
$transient = '_transient_' . $wpdb->escape($transient); $transient_option = '_transient_' . $wpdb->escape($transient);
return get_option($transient); $value = get_option($transient_option);
} }
return apply_filters('transient_' . $transient, $value);
} }
/** /**