get_preferred_from_update_core() – Selects the first update version from the update_core option.

You appear to be a bot. Output may be restricted

Description

Selects the first update version from the update_core option.

Usage

$object|array|false = get_preferred_from_update_core();

Parameters

Returns

object|array|false The response from the API on success, false on failure.

Source

File name: wordpress/wp-admin/includes/update.php
Lines:

1 to 10 of 10
function get_preferred_from_update_core() {
  $updates = get_core_updates();
  if ( ! is_array( $updates ) ) {
    return false;
  }
  if ( empty( $updates ) ) {
    return (object) array( 'response' => 'latest' );
  }
  return $updates[0];
}
 

 View on GitHub View on Trac