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

Avoid calling gutenberg_ functions within code shipped through WordPress Core #33331

Merged
merged 18 commits into from
Jul 13, 2021

Conversation

desrosj
Copy link
Contributor

@desrosj desrosj commented Jul 9, 2021

Description

This adjusts the code for the render_block_core_legacy_widget() function to remove the gutenberg_ specific functions referenced. Because the PHP file is copied directly into WordPress Core when running npm run build, the changes need to be made in the Gutenberg repo.

Plugin specific code should not be included in Core code unless completely unavoidable.

See: https://core.trac.wordpress.org/ticket/53610.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@desrosj desrosj self-assigned this Jul 9, 2021
@desrosj desrosj marked this pull request as ready for review July 9, 2021 14:15
@desrosj desrosj requested a review from ajitbohra as a code owner July 9, 2021 14:41
@youknowriad youknowriad added the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Jul 13, 2021
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@youknowriad youknowriad merged commit bda0bb9 into trunk Jul 13, 2021
@youknowriad youknowriad deleted the try/remove-gutenberg_-prefix-from-core-code branch July 13, 2021 15:21
@github-actions github-actions bot added this to the Gutenberg 11.1 milestone Jul 13, 2021
@youknowriad youknowriad removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Jul 13, 2021
@azaozz
Copy link
Contributor

azaozz commented Jul 13, 2021

Yep, looks good here too. Thanks @desrosj and @youknowriad.

ntsekouras added a commit that referenced this pull request Aug 5, 2021
* Check for the correct function.

* add prefix

Co-authored-by: ntsekouras <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants