Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove gutenberg references from block-library PHP files #12085

Closed
pento opened this issue Nov 20, 2018 · 8 comments
Closed

Remove gutenberg references from block-library PHP files #12085

pento opened this issue Nov 20, 2018 · 8 comments
Labels
[Package] Block library /packages/block-library [Status] In Progress Tracking issues with work in progress [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@pento
Copy link
Member

pento commented Nov 20, 2018

The PHP files in block-library are copied to Core and committed there, but they're going to be maintained in this repo for now.

To fit in properly with core, there are a couple of changes to make:

  • @package gutenberg should become @package WordPress.
  • All gutenberg_ function prefixes should be removed.

#10788 is related, for removing the 'gutenberg' textdomain from these files.

@pento pento added the [Package] Block library /packages/block-library label Nov 20, 2018
@pento pento added this to the 4.6 milestone Nov 20, 2018
@spencerfinnell
Copy link

spencerfinnell commented Nov 20, 2018

Are there plans to deprecate those functions or will they be removed completely? Lots of juggling of “what’s active” (plugin version vs core version) already, and removing these functions only makes things more difficult for plugins and themes built against the Gutenberg plugin over the last year.

@pento
Copy link
Member Author

pento commented Nov 20, 2018

@spencerfinnell: Do you have a use case for when you're relying on these particular functions?

@spencerfinnell
Copy link

I don’t have a specific use case but completely removing (renaming) functions a week before release doesn’t fit with the deprecation schedule that has been used for JavaScript functions/APIs.

@designsimply designsimply added the [Type] Task Issues or PRs that have been broken down into an individual action to take label Nov 20, 2018
@mtias mtias modified the milestones: 4.6, WordPress 5.0 Nov 21, 2018
@johnbillion
Copy link
Member

Has there been any discussion about prefixing the names of the new global functions with wp_?

@spencerfinnell
Copy link

Nope just this ticket 6 days before 33% of the web changes.

@mkaz
Copy link
Member

mkaz commented Nov 26, 2018

There are just two functions inside of one file block-library/latest-comments/index.php

Looking at the code, one of the functions was copied out of core because it could not be used included during rendering. The other function is used to render the latest comments block.

Both seem pretty unlikely they'd be called outside of latest-comments block

@swissspidy
Copy link
Member

We now have both render_block_core_latest_posts() and gutenberg_render_block_core_latest_comments() in core. At least the latter should definitely get renamed before 5.0.

There's also gutenberg_draft_or_post_title()...

@mtias mtias modified the milestones: WordPress 5.0, 4.6 Nov 30, 2018
@mcsf mcsf modified the milestones: 4.6, 4.7 Nov 30, 2018
@mtias mtias modified the milestones: 4.7, WordPress 5.0.1 Dec 6, 2018
@mtias mtias added the [Status] In Progress Tracking issues with work in progress label Dec 6, 2018
@noisysocks
Copy link
Member

When I grep gutenberg_ in the WordPress 5.0 branch I only see gutenberg_draft_or_post_title() which was removed in #12326 and will be included in core when the @wordpress/blocks dependency is updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block library /packages/block-library [Status] In Progress Tracking issues with work in progress [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

No branches or pull requests

9 participants