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

Navigation: Update the function name and correct the comment #32918

Merged
merged 4 commits into from
Jun 23, 2021

Conversation

scruffian
Copy link
Contributor

Description

This changes a function name and corrects an incorrect comment from #32491.

How has this been tested?

Using Quadrat, which implements this attribute

Screenshots

Types of changes

Bug fix (non-breaking change which fixes an issue)

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

@scruffian scruffian added the [Block] Navigation Affects the Navigation Block label Jun 23, 2021
@scruffian scruffian requested review from mtias and talldan June 23, 2021 10:56
@scruffian scruffian self-assigned this Jun 23, 2021
*
* @param array $location The location of the classic menu to display.
* @param array $attributes Navigation block attributes.
* @return string|false HTML markup of a generated Navigation Block or false if no location is specified.
*/
function render_classic_location_menu( $location, $attributes ) {
function gutenberg_render_menu_from_location( $location, $attributes ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@scruffian Just noticed that these two lines look to be unused in the function as well:

$block_attributes = $attributes;
unset( $block_attributes['__unstableLocation'] );

And it looks like the second $attributes param/argument to the function can be dropped too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, thanks. Done!

@mtias mtias added the [Type] Code Quality Issues or PRs that relate to code quality label Jun 23, 2021
@mtias
Copy link
Member

mtias commented Jun 23, 2021

Thanks! :)

@scruffian scruffian merged commit e9d9936 into trunk Jun 23, 2021
@scruffian scruffian deleted the update/navigation-location-attribute branch June 23, 2021 22:34
@github-actions github-actions bot added this to the Gutenberg 11.0 milestone Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants