Shiny Updates: Add ajax-y updates to the plugin list page, and ajax-y updates and installs to the plugin card page.

This also includes JS architecture that can be expanded to support theme, core and language pack updates.

Props pento, ericlewis, lgladdy, adamsilverstein, DrewAPicture

See #29820



git-svn-id: https://develop.svn.wordpress.org/trunk@31333 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast
2015-02-05 04:18:57 +00:00
parent f205eb63d0
commit 748d595b5c
11 changed files with 488 additions and 31 deletions

View File

@@ -501,6 +501,18 @@ function wp_default_scripts( &$scripts ) {
) );
$scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery' ) );
did_action( 'init' ) && $scripts->localize( 'updates', '_wpUpdatesSettings', array(
'ajax_nonce' => wp_create_nonce( 'updates' ),
'l10n' => array(
'updating' => __( 'Updating...' ),
'updated' => __( 'Updated!' ),
'updateFailed' => __( 'Update failed' ),
'installNow' => __( 'Install Now' ),
'installing' => __( 'Installing...' ),
'installed' => __( 'Installed!' ),
'installFailed' => __( 'Installation failed' ),
)
) );
$scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' );