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/formatting.php

    r48175 r48185  
    6565         * Filters whether to skip running wptexturize().
    6666         *
    67          * Passing false to the filter will effectively short-circuit wptexturize().
    68          * returning the original text passed to the function instead.
     67         * Returning false from the filter will effectively short-circuit wptexturize()
     68         * and return the original text passed to the function instead.
    6969         *
    7070         * The filter runs only once, the first time wptexturize() is called.
Note: See TracChangeset for help on using the changeset viewer.