[wp-trac] [WordPress Trac] #49926: Editor: Introduce WP_Block class

WordPress Trac noreply at wordpress.org
Tue May 5 18:00:02 UTC 2020


#49926: Editor: Introduce WP_Block class
-------------------------+------------------------------
 Reporter:  aduth        |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Editor       |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by aduth):

 There have been a few iterations to block context in Gutenberg after the
 pull request referenced in the original comment.

 Notably:

 - The approach using `ArrayAccess` to emulate backward-compatibility was
 not fully-compatible and was rolled back
    - Issue: https://github.com/WordPress/gutenberg/issues/21797
    - Fixes:
       - https://github.com/WordPress/gutenberg/pull/21868
       - https://github.com/WordPress/gutenberg/pull/21921
 - A second attempt was made, where instead of trying to reuse the first
 argument, a new third argument is added to `render_callback`
    - https://github.com/WordPress/gutenberg/pull/21925

 It's quite likely there will be further iterations to `WP_Block` in
 Gutenberg.

 The most up-to-date version should be found at:

 https://github.com/WordPress/gutenberg/blob/master/lib/class-wp-block.php

 Up-to-date file history:
 https://github.com/WordPress/gutenberg/commits/master/lib/class-wp-
 block.php

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49926#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list