Transients: After [41963], add missing cron task for `delete_expired_transients()`.

Props dlh.
Fixes #41699.
Built from https://develop.svn.wordpress.org/trunk@42008


git-svn-id: http://core.svn.wordpress.org/trunk@41842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2017-10-24 23:00:47 +00:00
parent 4812370aab
commit 5dd45b38c8
3 changed files with 8 additions and 6 deletions

View File

@ -87,6 +87,11 @@ auth_redirect();
if ( ! wp_next_scheduled( 'wp_scheduled_delete' ) && ! wp_installing() )
wp_schedule_event(time(), 'daily', 'wp_scheduled_delete');
// Schedule Transient cleanup.
if ( ! wp_next_scheduled( 'delete_expired_transients' ) && ! wp_installing() ) {
wp_schedule_event( time(), 'daily', 'delete_expired_transients' );
}
set_screen_options();
$date_format = __( 'F j, Y' );
@ -94,9 +99,6 @@ $time_format = __( 'g:i a' );
wp_enqueue_script( 'common' );
/**
* $pagenow is set in vars.php
* $wp_importers is sometimes set in wp-admin/includes/import.php

View File

@ -820,13 +820,13 @@ function set_transient( $transient, $value, $expiration = 0 ) {
* 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. +
* 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) {
function delete_expired_transients( $force_db = false ) {
global $wpdb;
if ( ! $force_db && wp_using_ext_object_cache() ) {

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-beta3-42007';
$wp_version = '4.9-beta3-42008';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.