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

Fix conditional check "Theme File Editor" menu #37616

Merged
merged 1 commit into from
Dec 23, 2021

Conversation

Mamaduka
Copy link
Member

Description

Follow-up for #37592.

It looks like I messed up something when doing initial tests and was getting incorrect results πŸ™‡β€β™‚οΈ

The _add_plugin_file_editor_to_tools isn't available when we're performing the check, so we still end up with two "Theme File Editor" sub-menu items.

Cord now uses wp_list_users for version check. We're using this function for similar checks in a few other places, so it should be safe.

Props to @costdev for discovering the issue πŸ₯‡

How has this been tested?

  1. Running WP 5.9 beta 4
  2. Go to the Dashboard and click on the "Tools" menu
  3. It should only display a single "Theme File Editor" sub-menu item.

Types of changes

Bugfix

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

@Mamaduka Mamaduka requested a review from aristath December 23, 2021 15:34
@Mamaduka Mamaduka self-assigned this Dec 23, 2021
@Mamaduka Mamaduka added [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Bug An existing feature does not function as intended General Interface Parts of the UI which don't fall neatly under other labels. labels Dec 23, 2021
@Mamaduka Mamaduka requested a review from ntsekouras December 23, 2021 15:44
@Mamaduka
Copy link
Member Author

@aristath, do you mind approving this one as well? πŸ™‡

P.S. Sorry about all the notifications.

@aristath aristath merged commit 24bc4d7 into trunk Dec 23, 2021
@aristath aristath deleted the fix/theme-editor-conditional branch December 23, 2021 17:39
@github-actions github-actions bot added this to the Gutenberg 12.3 milestone Dec 23, 2021
@aristath
Copy link
Member

Good catch! We missed this in the previous PR, I'm glad it was detected immediately πŸ‘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Themes Questions or issues with incorporating or styling blocks in a theme. General Interface Parts of the UI which don't fall neatly under other labels. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants