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

Fix docs and function naming for gallery block registration in PHP #37132

Merged
merged 4 commits into from
Dec 6, 2021

Conversation

ocean90
Copy link
Member

@ocean90 ocean90 commented Dec 5, 2021

Description

This PRs removes the gutenberg_ prefix for gutenberg_register_block_core_gallery() so it can be merged to WordPress core. It also improves the naming for render_block_core_gallery_data() to be less generic. And some minor doc changes.

I noticed these issue because I was trying to test the new gallery block in the current WordPress 5.9 beta but that didn't work since it's not enabled which may be an oversee. See also #36508 (comment).

This change is required for WordPress/wordpress-develop#2009

Types of changes

Bug fix

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).

@ocean90 ocean90 added the [Block] Gallery Affects the Gallery Block - used to display groups of images label Dec 5, 2021
Copy link
Member

@ramonjd ramonjd left a comment

Choose a reason for hiding this comment

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

LGTM

I ran through the testing I did for #35975

Everything works as expected.

Copy link
Contributor

@glendaviesnz glendaviesnz left a comment

Choose a reason for hiding this comment

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

Tested well for me also

@ocean90 ocean90 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 Dec 6, 2021
@ocean90 ocean90 merged commit fc8abe5 into trunk Dec 6, 2021
@ocean90 ocean90 deleted the fix/gallery-block-naming branch December 6, 2021 10:50
@github-actions github-actions bot added this to the Gutenberg 12.2 milestone Dec 6, 2021
@noisysocks noisysocks 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 Dec 13, 2021
noisysocks pushed a commit that referenced this pull request Dec 13, 2021
…37132)

* Docs: Don't align @param and @return tags

* Remove gutenberg_ prefix for register_block_core_gallery()

* Fix typo and docs formatting

* Rename function for clarity and to match similar functions

Example: block_core_navigation_typographic_presets_backcompatibility()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants