Changes between Initial Version and Version 1 of Ticket #51850, comment 4
- Timestamp:
- 11/23/2020 01:49:13 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #51850, comment 4
initial v1 3 3 Looks like in WP 5.5 `WP_Block::__get()` was used only to retrieve the block attributes: https://core.trac.wordpress.org/browser/tags/5.5/src/wp-includes/class-wp-block.php#L153, however in 5.6 it changed to get everything. 4 4 5 I'm probably missing something but why is that public `__get()` needed? The `$parsed_block` is passed in the constructor, so the `get_attributes()`, `get_inner_blocks()`, `get_inner_content()`, etc. would work without lazy-loading. What is the problem with setting the properties in the constructor at the same time as `$parsed_block`?5 I'm probably missing something but why is that public `__get()` needed? The `$parsed_block` is passed in the constructor, so the `get_attributes()`, `get_inner_blocks()`, `get_inner_content()`, etc. would work without additional loading, lazy or not. What is the problem with setting the properties in the constructor at the same time as `$parsed_block`? (Looks like they will have to be set in the new `WP_Block::reset()`.)