WordPress.org

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/link-template.php

    r48110 r48185  
    38583858     * Filters whether to preempt generating a shortlink for the given post.
    38593859     *
    3860      * Passing a truthy value to the filter will effectively short-circuit the
    3861      * shortlink-generation process, returning that value instead.
     3860     * Returning a truthy value from the filter will effectively short-circuit
     3861     * the shortlink generation process, returning that value instead.
    38623862     *
    38633863     * @since 3.0.0
Note: See TracChangeset for help on using the changeset viewer.