Summery Summery

Saves and restores user interface settings stored in a cookie.

Syntax Syntax


Description Description

Checks if the current user-settings cookie is updated and stores it. When no cookie exists (different browser used), adds the last saved cookie restoring the settings.

Source Source

File: wp-includes/option.php

		do_action( "set_transient_{$transient}", $value, $expiration, $transient );

		 * Fires after the value for a transient has been set.
		 * @since 3.0.0
		 * @since 3.6.0 The `$value` and `$expiration` parameters were added.
		 * @param string $transient  The name of the transient.
		 * @param mixed  $value      Transient value.
		 * @param int    $expiration Time until expiration in seconds.
		do_action( 'setted_transient', $transient, $value, $expiration );

	return $result;

 * Deletes all expired transients.
 * The multi-table delete syntax is used to delete the transient record
 * from table a, and the corresponding transient_timeout record from table b.
 * @since 4.9.0
 * @param bool $force_db Optional. Force cleanup to run against the database even when an external object cache is used.
function delete_expired_transients( $force_db = false ) {
	global $wpdb;

	if ( ! $force_db && wp_using_ext_object_cache() ) {

			"DELETE a, b FROM {$wpdb->options} a, {$wpdb->options} b
			WHERE a.option_name LIKE %s
			AND a.option_name NOT LIKE %s
			AND b.option_name = CONCAT( '_transient_timeout_', SUBSTRING( a.option_name, 12 ) )


Changelog Changelog

Version Description
2.7.0 Introduced.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.