Jetpack::get_update_details PHP Method

get_update_details() public static method

public static get_update_details ( )
    public static function get_update_details()
    {
        $update_details = array('update_core' => get_site_transient('update_core'), 'update_plugins' => get_site_transient('update_plugins'), 'update_themes' => get_site_transient('update_themes'));
        return $update_details;
    }

Usage Example

 public static function refresh_update_data()
 {
     if (current_user_can('update_core') && current_user_can('update_plugins') && current_user_can('update_themes')) {
         /**
          * Fires whenever the amount of updates needed for a site changes.
          * Syncs an array that includes the number of theme, plugin, and core updates available, as well as the latest core version available.
          *
          * @since 3.7.0
          *
          * @param string jetpack_updates
          * @param array Update counts calculated by Jetpack::get_updates
          */
         do_action('add_option_jetpack_updates', 'jetpack_updates', Jetpack::get_updates());
     }
     /**
      * Fires whenever the amount of updates needed for a site changes.
      * Syncs an array of core, theme, and plugin data, and which of each is out of date
      *
      * @since 3.7.0
      *
      * @param string jetpack_update_details
      * @param array Update details calculated by Jetpack::get_update_details
      */
     do_action('add_option_jetpack_update_details', 'jetpack_update_details', Jetpack::get_update_details());
 }
Jetpack