WordPress.org

Make WordPress Core

Changeset 48916


Ignore:
Timestamp:
08/31/2020 06:00:12 PM (5 months ago)
Author:
desrosj
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.
Merges [48909] to the 5.5 branch.
Fixes #50848.

Location:
branches/5.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.5

  • branches/5.5/src/wp-admin/includes/class-wp-automatic-updater.php

    r48889 r48916  
    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.