Make WordPress Core


Ignore:
Timestamp:
06/26/2020 06:47:28 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Docs: Standardize on "Returning a value from the filter" vs. "Passing a value to the filter".

The filter is the callback function added with add_filter(), therefore the hook passes a value to the filter, and the filter returns a value to change its behaviour.

The documentation is referring to the latter.

Props johnbillion.
See #49572, #16557.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/misc.php

    r48102 r48185  
    696696                     * settings. See the parent function for a full list of standard options.
    697697                     *
    698                      * Returning false to the filter will skip saving the current option.
     698                     * Returning false from the filter will skip saving the current option.
    699699                     *
    700700                     * @since 2.8.0
     
    717717                 * The dynamic portion of the hook, `$option`, refers to the option name.
    718718                 *
    719                  * Returning false to the filter will skip saving the current option.
     719                 * Returning false from the filter will skip saving the current option.
    720720                 *
    721721                 * @since 5.4.2
Note: See TracChangeset for help on using the changeset viewer.