Make WordPress Core

Changeset 13911


Ignore:
Timestamp:
04/01/2010 10:42:03 AM (15 years ago)
Author:
dd32
Message:

Delete _transient_timeout_$name and _site_transient_timeout_$name when specifically deleting transients. Fixes #12782

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r13910 r13911  
    681681        $result = wp_cache_delete( $transient, 'transient' );
    682682    } else {
     683        $option_timeout = '_transient_timeout_' . $transient;
    683684        $option = '_transient_' . $transient;
    684685        $result = delete_option( $option );
     686        if ( $result )
     687            delete_option( $option_timeout );
    685688    }
    686689
     
    35823585        $result = wp_cache_delete( $transient, 'site-transient' );
    35833586    } else {
     3587        $option_timeout = '_site_transient_timeout_' . $transient;
    35843588        $option = '_site_transient_' . $transient;
    35853589        $result = delete_site_option( $option );
     3590        if ( $result )
     3591            delete_site_option( $option_timeout );
    35863592    }
    35873593    if ( $result )
Note: See TracChangeset for help on using the changeset viewer.