Skip to content

Commit 128b1aa

Browse files
authored
Merge branch 'WordPress:trunk' into trunk
2 parents 7cefece + b0e62d8 commit 128b1aa

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/wp-includes/class-wp-view-config-data.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,12 @@ public function apply_filters( $kind, $name ) {
159159
* individual list members.
160160
*
161161
* A change that declares an unsupported schema version is rejected and does
162-
* not alter anything. Callbacks mutate the container in place, so there is no
163-
* need to return it; any returned value is ignored. Callbacks must not replace
164-
* the container with a different value, as later callbacks receive whatever the
165-
* the previous one returned.
162+
* not alter anything. As with any filter, each callback's return value is
163+
* passed to the next callback as `$data`, so callbacks must return the
164+
* container they received: a callback that returns nothing, or any other
165+
* value, hands that result to every callback hooked at a later priority
166+
* instead of the container. Since the write methods return the container,
167+
* a callback can end with `return $data->merge( $patch, $version );`.
166168
*
167169
* @since 7.1.0
168170
*

0 commit comments

Comments
 (0)