mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
Add transient_* filter. see #9048
git-svn-id: http://svn.automattic.com/wordpress/trunk@10533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c26b1324f6
commit
af8ed79529
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user