[wp-trac] [WordPress Trac] #22369: get_transient() do not call delete_transient() when deleting one
WordPress Trac
noreply at wordpress.org
Tue Nov 6 01:27:02 UTC 2012
#22369: get_transient() do not call delete_transient() when deleting one
-----------------------------+--------------------------
Reporter: juliobox | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: General
Version: trunk | Severity: normal
Keywords: |
-----------------------------+--------------------------
Hello
i was wondering why get_transient() is not calling delete_transient when
deleting a timeouted transient.
Piece of code from get_transient()
{{{
$transient_option = '_transient_' .
$transient;
$transient_timeout = '_transient_timeout_'
. $transient;
if ( get_option( $transient_timeout ) <
time() ) {
delete_option( $transient_option
);
delete_option( $transient_timeout
);
return false;
}
}}}
but i need to trigger the "deleted_transient" hook.
Can we do that:
{{{
$transient_option = '_transient_' .
$transient;
$transient_timeout = '_transient_timeout_'
. $transient;
if ( get_option( $transient_timeout ) <
time() ) {
delete_transient(
$transient_option );
return false;
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22369>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list