Commit fbf182f7 authored by Andrew Nacin's avatar Andrew Nacin
Browse files

Clarify return values for get_preferred_from_update_core() and get_core_updates().

props SergeyBiryukov.
fixes #20251.

Built from https://develop.svn.wordpress.org/trunk@27264


git-svn-id: https://core.svn.wordpress.org/trunk@27121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 0c2a99cc
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -7,9 +7,9 @@
 */

/**
 * Selects the first update version from the update_core option
 * Selects the first update version from the update_core option.
 *
 * @return object the response from the API
 * @return bool|object The response from the API on success, false on failure.
 */
function get_preferred_from_update_core() {
	$updates = get_core_updates();
@@ -21,11 +21,11 @@ function get_preferred_from_update_core() {
}

/**
 * Get available core updates
 * Get available core updates.
 *
 * @param array $options Set $options['dismissed'] to true to show dismissed upgrades too,
 * 	set $options['available'] to false to skip not-dismissed updates.
 * @return array Array of the update objects
 * @return bool|array Array of the update objects on success, false on failure.
 */
function get_core_updates( $options = array() ) {
	$options = array_merge( array( 'available' => true, 'dismissed' => false ), $options );