[wp-trac] [WordPress Trac] #52920: Editor: Abstract block editor configuration

WordPress Trac noreply at wordpress.org
Tue Jun 8 09:27:16 UTC 2021


#52920: Editor: Abstract block editor configuration
-----------------------------------------------------+---------------------
 Reporter:  gziolo                                   |       Owner:  gziolo
     Type:  enhancement                              |      Status:  closed
 Priority:  normal                                   |   Milestone:  5.8
Component:  Editor                                   |     Version:
 Severity:  normal                                   |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests needs-dev-note  |     Focuses:
-----------------------------------------------------+---------------------

Comment (by gziolo):

 @jadpm, thank you for your feedback. Actually, it's very similar to what
 @chrisvanpatten shared on GitHub in the accompanying PR. When you check
 [50983], you can see that the current approach is slightly different. All
 new filters have access to the instance of `WP_Block_Editor_Context` class
 that has optional `post` property. It replaced the string that represented
 the block editor context that was limiting in its application.

 In theory, we could keep old filters, too. My biggest concern is that in
 the long run, they would cause confusion because we now use the same post
 editor to edit not only the content of the post but also the template for
 the individual post. We kept in mind all that I mentioned when opting for
 the final solution that provides the flexibility that the
 `WP_Block_Editor_Context` class ebables.

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


More information about the wp-trac mailing list