Make WordPress Core


Ignore:
Timestamp:
02/05/2015 04:18:57 AM (10 years ago)
Author:
pento
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r31322 r31333  
    502502
    503503        $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery' ) );
     504        did_action( 'init' ) && $scripts->localize( 'updates', '_wpUpdatesSettings', array(
     505            'ajax_nonce' => wp_create_nonce( 'updates' ),
     506            'l10n'       => array(
     507                'updating'      => __( 'Updating...' ),
     508                'updated'       => __( 'Updated!' ),
     509                'updateFailed'  => __( 'Update failed' ),
     510                'installNow'    => __( 'Install Now' ),
     511                'installing'    => __( 'Installing...' ),
     512                'installed'     => __( 'Installed!' ),
     513                'installFailed' => __( 'Installation failed' ),
     514            )
     515        ) );
    504516
    505517        $scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' );
Note: See TracChangeset for help on using the changeset viewer.