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

Plugin: Remove 'function_exists' checks for methods with 'gutenberg' prefix #65260

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

Mamaduka
Copy link
Member

What?

PR removes function_exists checks for functions with the gutenberg prefix. These are plugin methods, and there should be no duplicates.

I also moved gutenberg_register_wp_rest_post_types_controller_fields into the correct compat files. The bugfix was merged in WP 6.6. See #62488.

Testing Instructions

  • Confirm no PHP warnings/errors are logged when visiting a site.
  • CI checks should be green.

@Mamaduka Mamaduka added Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Type] Code Quality Issues or PRs that relate to code quality labels Sep 12, 2024
@Mamaduka Mamaduka self-assigned this Sep 12, 2024
Copy link

github-actions bot commented Sep 12, 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: Mamaduka <[email protected]>
Co-authored-by: ramonjd <[email protected]>

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

@Mamaduka Mamaduka added the No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core label Sep 12, 2024
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 can't remember if this phpcs rule catches these or not.

I think that's the reason behind all the function_exists, could be wrong.

@Mamaduka Mamaduka merged commit f1403c4 into trunk Sep 12, 2024
74 of 77 checks passed
@Mamaduka Mamaduka deleted the remove/gutenberg-prefix-method-checks branch September 12, 2024 07:59
@github-actions github-actions bot added this to the Gutenberg 19.3 milestone Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core [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