Use a time constant in get_theme_feature_list() and File_Upload_Upgrader.

props GaVrA.
fixes #28124.
Built from https://develop.svn.wordpress.org/trunk@28253


git-svn-id: http://core.svn.wordpress.org/trunk@28081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-05-05 08:26:24 +00:00
parent f90a558df4
commit 997cbaa03c
2 changed files with 3 additions and 3 deletions

View File

@ -1679,7 +1679,7 @@ class File_Upload_Upgrader {
$this->id = wp_insert_attachment( $object, $file['file'] );
// schedule a cleanup for 2 hours from now in case of failed install
wp_schedule_single_event( time() + 7200, 'upgrader_scheduled_cleanup', array( $this->id ) );
wp_schedule_single_event( time() + 2 * HOUR_IN_SECONDS, 'upgrader_scheduled_cleanup', array( $this->id ) );
} elseif ( is_numeric( $_GET[$urlholder] ) ) {
// Numeric Package = previously uploaded file, see above.

View File

@ -238,7 +238,7 @@ function get_theme_feature_list( $api = true ) {
return $features;
if ( !$feature_list = get_site_transient( 'wporg_theme_feature_list' ) )
set_site_transient( 'wporg_theme_feature_list', array(), 10800);
set_site_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS );
if ( !$feature_list ) {
$feature_list = themes_api( 'feature_list', array() );
@ -249,7 +249,7 @@ function get_theme_feature_list( $api = true ) {
if ( !$feature_list )
return $features;
set_site_transient( 'wporg_theme_feature_list', $feature_list, 10800 );
set_site_transient( 'wporg_theme_feature_list', $feature_list, 3 * HOUR_IN_SECONDS );
$category_translations = array(
'Colors' => __( 'Colors' ),