Make WordPress Core


Ignore:
Timestamp:
06/26/2020 06:47:28 PM (4 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-includes/nav-menu-template.php

    r48109 r48185  
    9090     * Filters whether to short-circuit the wp_nav_menu() output.
    9191     *
    92      * Passing a non-null value to the filter will short-circuit
    93      * wp_nav_menu(), echoing that value if $args->echo is true,
    94      * returning that value otherwise.
     92     * Returning a non-null value from the filter will short-circuit wp_nav_menu(),
     93     * echoing that value if $args->echo is true, returning that value otherwise.
    9594     *
    9695     * @since 3.9.0
Note: See TracChangeset for help on using the changeset viewer.