Make WordPress Core

#56286 closed defect (bug) (fixed)

$block_content param description in filter render_block is too opinionated

Reported by: milana_cap's profile milana_cap Owned by: audrasjb's profile audrasjb
Milestone: 6.1 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch
Focuses: docs Cc:

Description

$block_content param description in filter render_block says:

(string) The block content about to be appended.

This is a bit too opinionated about its usage. You can prepend it, nest it, completely remove it, parse it.. I suggest removing the about to be appended part.

Attachments (1)

56286.diff (984 bytes) - added by milana_cap 20 months ago.

Download all attachments as: .zip

Change History (3)

@milana_cap
20 months ago

#1 @audrasjb
20 months ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 6.1
  • Owner set to audrasjb
  • Status changed from new to accepted

Hi Milana,

Looks good to me. Plus, it would be more consistent with other functions like render_block_core_file().

Moving to 6.1.

#2 @audrasjb
20 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 53780:

Docs: Improve parameter descriptions in render_block and render_block_* filters.

The former $block_content parameter descriptions were too opinionated as block content can be appended, prepended, nested, removed, etc.

Props milana_cap.
Fixes #56286.
See #55646.

Note: See TracTickets for help on using tickets.