WordPress.org

Make WordPress Core

Ticket #21330: 21330.patch

File 21330.patch, 674 bytes (added by wpsmith, 3 years ago)

Site Transient Filter Adjustment, first pass

  • option.php

     
    10211021function set_site_transient( $transient, $value, $expiration = 0 ) { 
    10221022        global $_wp_using_ext_object_cache; 
    10231023 
    1024         $value = apply_filters( 'pre_set_site_transient_' . $transient, $value ); 
     1024        $options = apply_filters( 'pre_set_site_transient_' . $transient, $value, $expiration ); 
     1025        if ( is_string( $options ) ) 
     1026                $value = $options; 
     1027        else 
     1028                extract( $options, EXTR_OVERWRITE ); 
    10251029 
    10261030        if ( $_wp_using_ext_object_cache ) { 
    10271031                $result = wp_cache_set( $transient, $value, 'site-transient', $expiration );