Make WordPress Core

Opened 4 weeks ago

Last modified 3 days ago

#61405 new defect (bug)

Residual of block found in `get_blocks_metadata` even when block is unregistered using `unregister_block_type()`.

Reported by: thekt12's profile thekt12 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch
Focuses: performance Cc:

Description

The get_blocks_metadata() function retrieves all registered blocks using WP_Block_Type_Registry::get_all_registered(). It updates its internal static variable with new blocks but does not account for blocks that have been unregistered. Consequently, residual blocks remain in the static variable and are processed in functions consuming get_blocks_metadata(), such as wp_add_global_styles_for_blocks. This oversight can lead to unnecessary processing overhead.

Change History (5)

This ticket was mentioned in PR #6764 on WordPress/wordpress-develop by @thekt12.


4 weeks ago
#1

  • Keywords has-patch added

#2 @sabernhardt
4 weeks ago

  • Component changed from General to Editor

#3 @thekt12
4 weeks ago

  • Focuses performance added

This ticket was mentioned in Slack in #core-performance by thekt12. View the logs.


4 weeks ago

This ticket was mentioned in Slack in #core-performance by mukeshpanchal27. View the logs.


3 days ago

Note: See TracTickets for help on using tickets.