Advertisements

delete_site_transient

Definition:
function delete_site_transient( $transient ) {}

Delete a site transient.

Parameters

  • string $transient: Transient name. Expected to not be SQL-escaped.

Return values

returns:True if successful, false otherwise

Defined actions

  • delete_site_transient_’.$transient
    do_action( 'delete_site_transient_' . $transient, $transient );
  • deleted_site_transient
    do_action( 'deleted_site_transient', $transient );

Source code

function delete_site_transient( $transient ) {

	global $_wp_using_ext_object_cache;



	do_action( 'delete_site_transient_' . $transient, $transient );

	if ( $_wp_using_ext_object_cache ) {

		$result = wp_cache_delete( $transient, 'site-transient' );

	} else {

		$option_timeout = '_site_transient_timeout_' . $transient;

		$option = '_site_transient_' . $transient;

		$result = delete_site_option( $option );

		if ( $result )

			delete_site_option( $option_timeout );

	}

	if ( $result )

		do_action( 'deleted_site_transient', $transient );

	return $result;

}

812

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: