Changeset 6489
- Timestamp:
- 01/31/2018 04:52:37 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
r6488 r6489 232 232 ); 233 233 234 // Get version from user agent since it's not explicitly sent to feature_list requests. 235 if ( preg_match( '|WordPress/([^;]+)|', $_SERVER['HTTP_USER_AGENT'], $matches ) ) { 234 // The 1.2+ api expects a `wp_version` field to be sent and does not use the UA. 235 if ( defined( 'THEMES_API_VERSION' ) && THEMES_API_VERSION >= 1.2 ) { 236 if ( isset( $this->request->wp_version ) ) { 237 $wp_version = $this->request->wp_version; 238 } 239 } elseif ( preg_match( '|WordPress/([^;]+)|', $_SERVER['HTTP_USER_AGENT'], $matches ) ) { 240 // Get version from user agent since it's not explicitly sent to feature_list requests in older API branches. 236 241 $wp_version = $matches[1]; 237 242 }
Note: See TracChangeset
for help on using the changeset viewer.