WordPress.org

Make WordPress Core

Ticket #21330: 21330_opt3.patch

File 21330_opt3.patch, 538 bytes (added by wpsmith, 21 months ago)

Option 3: New filter

  • wp-includes/option.php

     
    10221022        global $_wp_using_ext_object_cache; 
    10231023 
    10241024        $value = apply_filters( 'pre_set_site_transient_' . $transient, $value ); 
     1025        $expiration = apply_filters( 'pre_set_site_transient_exp_' . $transient, $expiration ); 
    10251026 
    10261027        if ( $_wp_using_ext_object_cache ) { 
    10271028                $result = wp_cache_set( $transient, $value, 'site-transient', $expiration );