Changes between Initial Version and Version 1 of Ticket #51612, comment 35
- Timestamp:
- 11/24/2020 03:55:48 PM (21 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #51612, comment 35
initial v1 8 8 However thinking that resetting the properties after rendering (i.e. the class properties are different before running render(), while running render(), and after running render()) makes things more complex, and hard to understand and work with. Same for the magic `__get()`. 9 9 10 Probably missing something but what purpose/use case does this solve? Seems these properties can be instantiated with `null` , then setduring `render()`. Why do they need to be unset/reset after that? `render_block()` calls `$block->render()` immediately after instantiating WP_Block, so these will be (should be) correct there.10 Probably missing something but what purpose/use case does this solve? Seems these properties can be instantiated with `null` or the corresponding values from `$parsed_block`, then set/changed during `render()`. Why do they need to be unset/reset after that? `render_block()` calls `$block->render()` immediately after instantiating WP_Block, so these will be (should be) correct there. 11 11 12 12 > Right but the sanitization is a series of filters on the individual post fields. Including a `display` filter.