Make WordPress Core


Ignore:
Timestamp:
06/26/2020 06:47:28 PM (19 months 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-includes/class-wp-oembed.php

    r48121 r48185  
    382382         * replacing it with a routine that is more optimal for your setup.
    383383         *
    384          * Passing a non-null value to the filter will effectively short-circuit retrieval,
    385          * returning the passed value instead.
     384         * Returning a non-null value from the filter will effectively short-circuit retrieval
     385         * and return the passed value instead.
    386386         *
    387387         * @since 4.5.3
Note: See TracChangeset for help on using the changeset viewer.