Make WordPress Core

Changeset 28105


Ignore:
Timestamp:
04/13/2014 07:01:21 PM (11 years ago)
Author:
nacin
Message:

Theme install: Set a timeout and error message for API responses.

props ocean90.
fixes #27708.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/theme.js

    r28062 r28105  
    326326            url: 'https://api.wordpress.org/themes/info/1.1/?callback=?',
    327327            dataType: 'jsonp',
     328            timeout: 15000, // 15 seconds
    328329
    329330            // Request data
  • trunk/src/wp-admin/theme-install.php

    r28037 r28105  
    5757        'upload' => __( 'Upload Theme' ),
    5858        'back'   => __( 'Back' ),
    59         'error'  => ( 'There was a problem trying to load the themes. Please, try again.' ), // @todo improve
     59        'error'  => sprintf( __( 'An unexpected error occurred and we can&#8127;t reach WordPress.org. If you continue to have problems, please try the <a href="%s">support forums</a>.' ), __( 'https://wordpress.org/support/' ) )
    6060    ),
    6161    'installedThemes' => array_keys( $installed_themes ),
Note: See TracChangeset for help on using the changeset viewer.