Theme install: Set a timeout and error message for API responses.
props ocean90. fixes #27708. Built from https://develop.svn.wordpress.org/trunk@28105 git-svn-id: http://core.svn.wordpress.org/trunk@27936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6fc0120e20
commit
cd5f8d517c
|
@ -325,6 +325,7 @@ themes.Collection = Backbone.Collection.extend({
|
|||
return $.ajax({
|
||||
url: 'https://api.wordpress.org/themes/info/1.1/?callback=?',
|
||||
dataType: 'jsonp',
|
||||
timeout: 15000, // 15 seconds
|
||||
|
||||
// Request data
|
||||
data: {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -56,7 +56,7 @@ wp_localize_script( 'theme', '_wpThemeSettings', array(
|
|||
'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis)
|
||||
'upload' => __( 'Upload Theme' ),
|
||||
'back' => __( 'Back' ),
|
||||
'error' => ( 'There was a problem trying to load the themes. Please, try again.' ), // @todo improve
|
||||
'error' => sprintf( __( 'An unexpected error occurred and we can᾿t reach WordPress.org. If you continue to have problems, please try the <a href="%s">support forums</a>.' ), __( 'https://wordpress.org/support/' ) )
|
||||
),
|
||||
'installedThemes' => array_keys( $installed_themes ),
|
||||
'browse' => array(
|
||||
|
|
Loading…
Reference in New Issue