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

chore: remove unnecessary isset() in _gutenberg_get_block_template_files() #66698

Conversation

justlevine
Copy link
Contributor

What?

This PR removes an unnecessary isset() from a conditional in _gutenberg_get_block_template_files()

Why?

While this issue was surfaced by PHPStan (via #66693) it can be remediated independently as part of #66598

How?

Testing Instructions

Testing Instructions for Keyboard

Screenshots or screencast

Copy link

github-actions bot commented Nov 2, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: justlevine <[email protected]>
Co-authored-by: SantosGuillamot <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Nov 2, 2024
Copy link

github-actions bot commented Nov 2, 2024

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @justlevine! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

Copy link
Contributor

@SantosGuillamot SantosGuillamot left a comment

Choose a reason for hiding this comment

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

Thansk for the pull request! Looks good to me 🙂

@SantosGuillamot SantosGuillamot added the [Type] Code Quality Issues or PRs that relate to code quality label Dec 9, 2024
@SantosGuillamot
Copy link
Contributor

It'd be great to do the same change in WordPress core, and add the backport changelog file. I could help you with that if you wish.

Apart from that, it seems there are some conflicts, so this might require a rebase.

@SantosGuillamot
Copy link
Contributor

Nevermind, I just realized this is in wordpress-6.6 compat folder, which was removed after WordPress 6.7 release: #67117.

I'm closing this pull request because it doesn't apply anymore, but I believe it would make sense to apply this same change in WordPress core: https://github.com/WordPress/wordpress-develop/blob/d93b275c3a5bbbbaf74690c1894d54da64fb3467/src/wp-includes/block-template-utils.php#L426

@justlevine justlevine deleted the chore/gutenberg_get_block_template_files-isset branch December 28, 2024 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants