Make WordPress Core

Changeset 48909


Ignore:
Timestamp:
08/31/2020 01:18:39 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Clarify the usage of null for auto_update_{$type} filter.

The value is internally used to detect whether nothing has hooked into this filter.

Props audrasjb, pbiron, johnbillion, SergeyBiryukov.
Fixes #50848.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-automatic-updater.php

    r48903 r48909  
    196196                 *
    197197                 * @since 3.7.0
    198                  *
    199                  * @param bool   $update Whether to update.
    200                  * @param object $item   The update offer.
     198                 * @since 5.5.0 The `$update` parameter accepts the value of null.
     199                 *
     200                 * @param bool|null $update Whether to update. The value of null is internally used
     201                 *                          to detect whether nothing has hooked into this filter.
     202                 * @param object    $item   The update offer.
    201203                 */
    202204                $update = apply_filters( "auto_update_{$type}", $update, $item );
Note: See TracChangeset for help on using the changeset viewer.