Theme Installer: Revert to proxying through PHP for WordPress.org API requests.

This is to ensure we have valid installation nonces, though we've run into this as a problem previously (see #27639, #27581, #27055).

A tad slower, but we gained speed in 3.9 by simplifying the request made to the API.

props ocean90.
fixes #27798.


git-svn-id: https://develop.svn.wordpress.org/trunk@28126 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2014-04-15 01:15:43 +00:00
parent 16490ce89c
commit 7ed14feff1
6 changed files with 84 additions and 58 deletions

View File

@@ -202,7 +202,7 @@ if ( isset($_GET['action']) ) {
include_once ABSPATH . 'wp-admin/includes/theme-install.php'; //for themes_api..
check_admin_referer( 'install-theme' );
check_admin_referer( 'install-theme_' . $theme );
$api = themes_api('theme_information', array('slug' => $theme, 'fields' => array('sections' => false, 'tags' => false) ) ); //Save on a bit of bandwidth.
if ( is_wp_error($api) )