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

Code Quality: Remove gutenberg_initialize_editor #53527

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

ockham
Copy link
Contributor

@ockham ockham commented Aug 10, 2023

What?

Remove the gutenberg_initialize_editor function, defined in lib/experimental/editor-settings.php.

Why?

I came across this function the other day. A quick grep revealed that it doesn't seem to be called anywhere.

git bisect revealed that the last known use of that function was in lib/experimental/navigation-page.php, which was removed in #47055, alongside a lot of other code. It was probably by oversight that gutenberg_initialize_editor was left behind.

How?

Delete

Testing Instructions

Look for any invocations of gutenberg_initialize_editor, or maybe just initialize_editor if you're paranoid (like myself) that maybe we do some obscure prefix mangling somewhere in the build process.

Also, give the editor some smoke testing (both Post Editor and Site Editor).

@ockham ockham added the [Type] Code Quality Issues or PRs that relate to code quality label Aug 10, 2023
@ockham ockham self-assigned this Aug 10, 2023
@ockham ockham marked this pull request as ready for review August 10, 2023 12:43
@ockham ockham requested a review from spacedmonkey as a code owner August 10, 2023 12:43
@github-actions
Copy link

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! ❤️

View changed files
❔ lib/experimental/editor-settings.php

@ockham ockham changed the title Experimental: Remove gutenberg_initialize_editor Code Quality: Remove gutenberg_initialize_editor Aug 10, 2023
@getdave getdave requested review from draganescu and talldan August 10, 2023 13:23
Copy link
Contributor

@draganescu draganescu left a comment

Choose a reason for hiding this comment

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

Seems legit!

@ockham ockham merged commit 3f4b280 into trunk Aug 10, 2023
@ockham ockham deleted the remove/gutenberg-initialize-editor branch August 10, 2023 16:56
@github-actions github-actions bot added this to the Gutenberg 16.5 milestone Aug 10, 2023
@SiobhyB SiobhyB added the Needs PHP backport Needs PHP backport to Core label Sep 5, 2023
@mikachan mikachan removed the Needs PHP backport Needs PHP backport to Core label Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants