From c298458751ae2ddc0eae62c296e28395526279cb Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 27 Sep 2020 08:36:06 +0000 Subject: [PATCH] Docs: Add missing `@return` tags for some `WP_Automatic_Updater` methods: * `::is_vcs_checkout()` * `::should_update()` * `::send_core_update_notification_email()` Props ankitmaru, mukesh27. Fixes #51385. Built from https://develop.svn.wordpress.org/trunk@49061 git-svn-id: http://core.svn.wordpress.org/trunk@48823 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-automatic-updater.php | 9 +++++++-- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/class-wp-automatic-updater.php b/wp-admin/includes/class-wp-automatic-updater.php index 9cf0a04ac1..f55247c7e6 100644 --- a/wp-admin/includes/class-wp-automatic-updater.php +++ b/wp-admin/includes/class-wp-automatic-updater.php @@ -62,7 +62,7 @@ class WP_Automatic_Updater { * filesystem to the top of the drive, erring on the side of detecting a VCS * checkout somewhere. * - * ABSPATH is always checked in addition to whatever $context is (which may be the + * ABSPATH is always checked in addition to whatever `$context` is (which may be the * wp-content directory, for example). The underlying assumption is that if you are * using version control *anywhere*, then you should be making decisions for * how things get updated. @@ -70,6 +70,8 @@ class WP_Automatic_Updater { * @since 3.7.0 * * @param string $context The filesystem path to check, in addition to ABSPATH. + * @return bool True if a VCS checkout was discovered at `$context` or ABSPATH, + * or anywhere higher. False otherwise. */ public function is_vcs_checkout( $context ) { $context_dirs = array( untrailingslashit( $context ) ); @@ -112,7 +114,7 @@ class WP_Automatic_Updater { * * @since 3.7.0 * - * @param bool $checkout Whether a VCS checkout was discovered at $context + * @param bool $checkout Whether a VCS checkout was discovered at `$context` * or ABSPATH, or anywhere higher. * @param string $context The filesystem context (a path) against which * filesystem status should be checked. @@ -132,6 +134,7 @@ class WP_Automatic_Updater { * @param object $item The update offer. * @param string $context The filesystem context (a path) against which filesystem * access and status should be checked. + * @return bool True if the item should be updated, false otherwise. */ public function should_update( $type, $item, $context ) { // Used to see if WP_Filesystem is set up to allow unattended updates. @@ -242,6 +245,8 @@ class WP_Automatic_Updater { * @since 3.7.0 * * @param object $item The update offer. + * @return bool True if the site administrator is notified of a core update, + * false otherwise. */ protected function send_core_update_notification_email( $item ) { $notified = get_site_option( 'auto_core_update_notified' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 45d1bf266d..61166a384a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-49060'; +$wp_version = '5.6-alpha-49061'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.