Skip to content

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

Merged
youknowriad merged 18 commits intotrunkfrom
try/remove-gutenberg_-prefix-from-core-code
Jul 13, 2021
Merged

Avoid calling gutenberg_ functions within code shipped through WordPress Core#33331
youknowriad merged 18 commits intotrunkfrom
try/remove-gutenberg_-prefix-from-core-code

Conversation

@desrosj
Copy link
Copy Markdown
Member

@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
Comment thread packages/block-library/src/post-template/index.php
Comment thread packages/widgets/src/blocks/legacy-widget/index.php Outdated
Comment thread lib/compat/wordpress-5.8/index.php Outdated
Copy link
Copy Markdown
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
@azaozz
Copy link
Copy Markdown
Contributor

azaozz commented Jul 13, 2021

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

Comment thread lib/compat/wordpress-5.8/index.php
ntsekouras added a commit that referenced this pull request Aug 5, 2021
* Check for the correct function.

* add prefix

Co-authored-by: ntsekouras <ntsekouras@outlook.com>
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