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

Use _builtin property of classes in navigation link PHP #35166

Merged
merged 1 commit into from
Sep 28, 2021

Conversation

spacedmonkey
Copy link
Member

Description

Use the _builtin property of the WP_Post_Type and WP_Taxonomy classes instead of hardcoring.

How has this been tested?

Screenshots

Types of changes

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

@spacedmonkey spacedmonkey self-assigned this Sep 27, 2021
Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

Tested and works as expected. I love the improved check.

P.S. I used following snippet to get block variations:

wp.blocks.getBlockType('core/navigation-link').variations;

@Mamaduka Mamaduka merged commit 6afaa99 into WordPress:trunk Sep 28, 2021
@github-actions github-actions bot added this to the Gutenberg 11.7 milestone Sep 28, 2021
@gwwar
Copy link
Contributor

gwwar commented Sep 28, 2021

Nice improvement, thanks @spacedmonkey !

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.

3 participants