Skip to content

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

Merged
ocean90 merged 4 commits into
trunkfrom
fix/gallery-block-naming
Dec 6, 2021
Merged

Fix docs and function naming for gallery block registration in PHP#37132
ocean90 merged 4 commits into
trunkfrom
fix/gallery-block-naming

Conversation

@ocean90

@ocean90 ocean90 commented Dec 5, 2021

Copy link
Copy Markdown
Member

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

@ramonjd ramonjd left a comment

Copy link
Copy Markdown
Member

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.

@glendaviesnz glendaviesnz left a comment

Copy link
Copy Markdown
Contributor

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 force-pushed the fix/gallery-block-naming branch from f9bdea1 to f30bd27 Compare December 6, 2021 08:22
@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 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