X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/41578db67d72562346e4dbb2a14889b23d522813..9e77185fafaf4e60e2b73821e0e4b9b1a11fb85f:/wp-admin/includes/theme.php diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index ab665f81..eaef0bcd 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -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' ), @@ -282,7 +282,7 @@ function get_theme_feature_list( $api = true ) { * It is possible for a theme to override the Themes API result with three * filters. Assume this is for themes, which can extend on the Theme Info to * offer more choices. This is very powerful and must be used with care, when - * overridding the filters. + * overriding the filters. * * The first filter, 'themes_api_args', is for the args and gives the action as * the second parameter. The hook for 'themes_api_args' must ensure that an @@ -430,7 +430,7 @@ function wp_prepare_themes_for_js( $themes = null ) { 'update' => get_theme_update_available( $theme ), 'actions' => array( 'activate' => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null, - 'customize'=> current_user_can( 'edit_theme_options' ) ? wp_customize_url( $slug ) : null, + 'customize' => ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) ? wp_customize_url( $slug ) : null, 'preview' => add_query_arg( array( 'preview' => 1, 'template' => urlencode( $theme->get_template() ),