Skip to content

Docs: Document the missing parameters of render_block_core_block() - #13587

Open
som3669 wants to merge 1 commit into
WordPress:trunkfrom
som3669:65860-document-render-block-core-block-params
Open

som3669 wants to merge 1 commit into
WordPress:trunkfrom
som3669:65860-document-render-block-core-block-params

Conversation

@som3669

@som3669 som3669 commented Sep 17, 2026

Copy link
Copy Markdown

render_block_core_block() is the render callback registered for the core/block block and receives three arguments, but its docblock only documented $attributes.

$content and $block_instance were never documented, even though $block_instance is used in the function body to attach the referenced pattern's blocks as inner blocks (parsed_block['innerBlocks']), refresh its context dependents, and render the result.

The new descriptions follow the wording used by the majority of core block render callbacks (Block default content. and Block instance., which are the most common phrasings in src/wp-includes/blocks/), and the @param block is aligned. The blank line between the @param block and @return is also removed, per the Inline Documentation Standards.

Testing

  • php -l clean on the changed file.
  • Documentation only, no behaviour change — no runtime code is touched.

Trac ticket: https://core.trac.wordpress.org/ticket/65860

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5
Used for: Repository scanning to identify potential documentation/signature inconsistencies, and drafting this change. Reviewed by me.

`render_block_core_block()` is the render callback for the `core/block` block
and receives three arguments, but its docblock only documented `$attributes`.

`$content` and `$block_instance` were never documented, even though
`$block_instance` is used in the function body to attach the referenced
pattern's blocks as inner blocks and render them.

The descriptions follow the wording used by the majority of core block render
callbacks. The blank line between the `@param` block and `@return` is also
removed, per the inline documentation standards.

See #65860.
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props som9663.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant