Changeset 6488
- Timestamp:
- 01/31/2018 04:30:38 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-themes-api.php
r6486 r6488 339 339 } 340 340 341 // If there is a cached result, return that.342 $cache_key = sanitize_key( __METHOD__ . ':' . get_locale() . ':' . md5( serialize( $this->request ) ) );343 if ( false !== ( $this->response = wp_cache_get( $cache_key, $this->cache_group ) ) && empty( $this->request->cache_buster ) ) {344 return;345 }346 347 341 // Set which fields wanted by default: 348 342 $defaults = array( … … 356 350 'template' => true, 357 351 ); 352 if ( defined( 'THEMES_API_VERSION' ) && THEMES_API_VERSION >= 1.2 ) { 353 $defaults['extended_author'] = true; 354 } 358 355 359 356 if ( empty( $this->request->fields ) ) { … … 361 358 } 362 359 $this->fields = array_merge( $this->fields, $defaults, (array) $this->request->fields ); 360 361 // If there is a cached result, return that. 362 $cache_key = sanitize_key( __METHOD__ . ':' . get_locale() . ':' . $this->request->slug . ':' . md5( serialize( $this->fields ) ) ); 363 if ( false !== ( $this->response = wp_cache_get( $cache_key, $this->cache_group ) ) && empty( $this->request->cache_buster ) ) { 364 return; 365 } 363 366 364 367 if ( !empty( $post ) && 'repopackage' == $post->post_type && $this->request->slug === $post->post_name ) { … … 440 443 ); 441 444 442 443 445 $this->fields = array_merge( $this->fields, $defaults, (array) $this->request->fields ); 444 446 … … 596 598 if ( $this->fields['extended_author'] ) { 597 599 $phil->author = (object) array( 600 'profile' => 'https://profiles.wordpress.org/' . $author->user_nicename, 601 'avatar' => 'https://secure.gravatar.com/avatar/' . md5( $author->user_email ) . '?s=96&d=monsterid&r=g', 598 602 'user_nicename' => $author->user_nicename, 599 603 'display_name' => $author->display_name,
Note: See TracChangeset
for help on using the changeset viewer.