Add pre_transient filter
git-svn-id: http://svn.automattic.com/wordpress/trunk@10862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c31fdfbca7
commit
ef9237e7b0
|
@ -662,6 +662,10 @@ function delete_transient($transient) {
|
|||
function get_transient($transient) {
|
||||
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 ) {
|
||||
$value = wp_cache_get($transient, 'transient');
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue