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. git-svn-id: https://develop.svn.wordpress.org/trunk@49061 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8357bb923c
commit
0c4958bdbc
@ -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' );
|
||||
|
Loading…
Reference in New Issue
Block a user