Changeset 13758
- Timestamp:
- 05/30/2024 04:21:10 AM (23 months ago)
- Location:
- sites/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/themes/info/1.0/index.php
r12850 r13758 147 147 148 148 // Cache when a theme doesn't exist. See the validation handler above. 149 if ( 'theme_information' == $action && isset( $slug ) && 404 == http_response_code() ) { 149 if ( 150 'theme_information' == $action && 151 isset( $slug ) && 152 404 == http_response_code() && 153 // Validate that the theme doesn't exist for update-checks, as a sanity check. 154 ! wp_cache_get( $slug, 'theme-update-check' ) && 155 // And that there were no DB errors. 156 empty( $wpdb->last_error ) 157 ) { 150 158 wp_cache_set( $slug, 'not_found', 'theme_information_error', WEEK_IN_SECONDS ); 151 159 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/themes-api.php
r12848 r13758 3 3 * Adjustments for the Themes API. 4 4 */ 5 6 // Mark it as a global group whenever the theme directory is loaded. 7 wp_cache_add_global_groups( 'theme-update-check' ); 5 8 6 9 /** … … 11 14 */ 12 15 function wporg_themes_update_check( $post_id, $current_version ) { 13 $slug = get_post( $post_id )->post_name; 14 $cache_group = 'theme-update-check'; 15 wp_cache_add_global_groups( $cache_group ); 16 $slug = get_post( $post_id )->post_name; 16 17 17 18 $theme_meta = array( … … 21 22 ); 22 23 23 wp_cache_set( $slug, $theme_meta, $cache_group);24 wp_cache_set( $slug, $theme_meta, 'theme-update-check' ); 24 25 25 26 // Delete the error cache if this theme is new.
Note: See TracChangeset
for help on using the changeset viewer.