Make WordPress Core


Ignore:
Timestamp:
02/05/2015 04:18:57 AM (11 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-admin/includes/plugin-install.php

    r31326 r31333  
    277277    $status = 'install';
    278278    $url = false;
     279    $update_file = false;
    279280
    280281    /*
     
    305306                $key = array_keys( $installed_plugin );
    306307                $key = array_shift( $key ); //Use the first plugin regardless of the name, Could have issues for multiple-plugins in one directory if they share different version numbers
     308                $update_file = $api->slug . '/' . $key;
    307309                if ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '=') ){
    308310                    $status = 'latest_installed';
     
    328330        $url .= '&from=' . urlencode( wp_unslash( $_GET['from'] ) );
    329331
    330     return compact('status', 'url', 'version');
     332    $file = $update_file;
     333    return compact( 'status', 'url', 'version', 'file' );
    331334}
    332335
Note: See TracChangeset for help on using the changeset viewer.