[wp-trac] [WordPress Trac] #53610: Remove references to Gutenberg specific functions

WordPress Trac noreply at wordpress.org
Sun Jul 11 02:30:10 UTC 2021


#53610: Remove references to Gutenberg specific functions
-------------------------------------+---------------------
 Reporter:  desrosj                  |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  5.8
Component:  Editor                   |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  needs-testing has-patch  |     Focuses:
-------------------------------------+---------------------

Comment (by azaozz):

 Replying to [comment:8 desrosj]:
 > I don't love adding two individual filters to get around this, but I
 dislike shipping plugin specific code more.

 Yeah, from a technical point of view having two (mostly unusable?) filters
 there that will have to be supported in the future is not a good thing.

 On the other hand having some code in core that references a plugin is no
 good either.

 On yet another hand Gutenberg is part of WP core despite that it is being
 developed in a different repo and that many of the contributors to it
 don't contribute to the rest of WP.

 Replying to [comment:11 jorbin]:
 > The `gutenberg` prefix should be reserved for the plugin. The only time
 that WordPress core should be referencing functions with the gutenberg
 prefix are when upgrading WordPress should be forcing a deactivation of
 the plugin.

 Yep, I agree. Would be ideal to not have any code in core that references
 a plugin, no matter which. On the other hand Gutenberg can be seen as a
 "component" of core that's also being made available for previous versions
 of WP. It uses the plugins API for lack of a better way. In that case,
 perhaps, having some core code referencing it is not completely out of the
 question.

 Frankly I'm 50/50 on which is better: few `gutenberg_` prefixes (that will
 likely be removed in the next WP version) or couple of highly specialized
 filters (that will likely stick around "forever"). From a purely technical
 point of view the prefixes are better/easier to deal with. Perhaps adding
 some inline comments there clearly explaining the use of the prefixes
 would be an acceptable compromise?

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


More information about the wp-trac mailing list