Block Library: Post Author: Reference attributes by argument #22114
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #22100
This pull request seeks to resolve a warning which can occur when a Post Author full-site editing block is part of the current page's template.
Implementation Notes:
As noted at #22100 (comment), there was a rapid series of changes which occurred where a
WP_Block$blockwas at one point the first argument provided to arender_callback. This was later reverted.As best I can tell, the only property of the block which was used in this function is the attributes, which were and still remain the first argument as an array. The
WP_Blockinstance is still available now as the third argument ofrender_callbackif needed (as of #21925), but it doesn't appear to currently be needed.Testing Instructions:
single) which includes a Post Author block