[wp-trac] [WordPress Trac] #61696: Make overriding and back porting classes from gutenberg repo easier

WordPress Trac noreply at wordpress.org
Thu Jul 18 18:46:46 UTC 2024


#61696: Make overriding and back porting classes from gutenberg repo easier
--------------------------+------------------------------
 Reporter:  spacedmonkey  |       Owner:  (none)
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Editor        |     Version:  5.0
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by joemcgill):

 This same concern was previously raised in
 https://github.com/WordPress/gutenberg/issues/62594.

 In that discussion, another option that was discussed was to make these
 classes in the WordPress repo read-only and sync them the way we do PHP
 code in block packages.

 While that would make maintainability a bit easier, it still doesn't allow
 the same code paths to be tested by the Gutenberg plugin that will be run
 once the code is synced, since many times the static methods are
 referenced directly in code, as you rightly point out.

 I agree that being able to filter the entire class being used would help
 here and pointed out `_wp_image_editor_choose` and `rest_get_server` a
 couple other examples of functions where Core provides filters for
 overriding entire classes.

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


More information about the wp-trac mailing list