Changeset 9526
- Timestamp:
- 02/21/2020 02:08:17 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-themes-api.php
r9525 r9526 426 426 */ 427 427 public function query_themes() { 428 global $wp_query;429 430 428 // Set which fields wanted by default: 431 429 $defaults = array( … … 451 449 if ( false !== ( $this->response = wp_cache_get( $cache_key, $this->cache_group ) ) && empty( $this->request->cache_buster ) ) { 452 450 451 // TODO: Remove this debug after Feb 21st 2020. See #3215. 453 452 // DEBUG - Attempt to skip the cache when it only contains one theme when it should contain many. 454 453 if ( … … 463 462 return; 464 463 } 465 } 466 467 if ( isset( $wp_query ) && $wp_query->query_vars ) { 468 $this->result = $wp_query; 469 } else { 470 $this->result = $this->perform_wp_query(); 471 } 464 465 } 466 467 $this->result = $this->perform_wp_query(); 472 468 473 469 if ( empty( $this->request->fields ) ) { … … 492 488 $this->response->themes[] = $this->fill_theme( $theme ); 493 489 } 494 495 /*496 // DEBUG - Try to find out why the cache for the popular/featured views occasionally only include 1 theme.497 if (498 function_exists( 'slack_dm' ) &&499 ( 1 === $this->response->info['results'] || 0 === $this->response->info['results'] ) &&500 isset( $this->request->browse ) &&501 'popular' === $this->request->browse502 ) {503 slack_dm( $_SERVER['REQUEST_URI'], 'dd32' );504 slack_dm( print_r( $this->request, 1 ), 'dd32' );505 slack_dm( print_r( $wp_query, 1 ), 'dd32' );506 } */507 490 508 491 wp_cache_set( $cache_key, $this->response, $this->cache_group, $this->cache_life );
Note: See TracChangeset
for help on using the changeset viewer.