mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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: http://core.svn.wordpress.org/trunk@27121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
00bb092d31
commit
9c9c824de2
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user