Make WordPress Core


Ignore:
Timestamp:
07/18/2014 08:48:28 PM (12 years ago)
Author:
nacin
Message:

Add 'Details' links to installed plugins.

Installed plugins that are up to date are now returned in the update-check API response.

props tellyworth.
see #17902.

File:
1 edited

Legend:

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

    r28823 r29226  
    278278                        'translations' => json_encode( $translations ),
    279279                        'locale'       => json_encode( $locales ),
     280                        'all'          => json_encode( true ),
    280281                ),
    281282                'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
     
    304305        }
    305306        unset( $plugin );
     307        foreach ( $response['no_update'] as &$plugin ) {
     308                $plugin = (object) $plugin;
     309        }
     310        unset( $plugin );
    306311
    307312        if ( is_array( $response ) ) {
    308313                $new_option->response = $response['plugins'];
    309314                $new_option->translations = $response['translations'];
     315                // TODO: Perhaps better to store no_update in a separate transient with an expiry?
     316                $new_option->no_update = $response['no_update'];
    310317        } else {
    311318                $new_option->response = array();
    312319                $new_option->translations = array();
     320                $new_option->no_update = array();
    313321        }
    314322
Note: See TracChangeset for help on using the changeset viewer.