Repository navigation
Conversation
mukeshpanchal27
left a comment
There was a problem hiding this comment.
Thanks @pbearne Left some nit-pick.
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
|
@mukeshpanchal27 Thanks |
There was a problem hiding this comment.
🟡 Changes recommended
The tests remain order-dependent because they do not clear existing submenu entries, and one test fails to restore the original widget-support state.
2 open issues
What changed in this PR
Adds PHPUnit coverage for WordPress’s wp_widgets_add_menu() function, associated with Trac ticket #57224. No production code changes are included.
Changes:
- Tests that no submenu is added without widget support.
- Tests Widgets submenu placement with widget support and with block template parts enabled.
| File | Description |
|---|---|
tests/phpunit/tests/functions/wpWidgetsAddMenu.php |
Adds three tests for Widgets submenu creation and placement. |
Review effort: Balanced
lancewillett
left a comment
There was a problem hiding this comment.
This needs a behavior/fixture refresh for current core: classic widgets now occupy index 9, and block-template-parts support no longer selects the block-theme branch. Please control the theme and submenu inputs before asserting the Widgets entry. This also overlaps #5830; consolidate the alternatives rather than landing both.
AI review · gpt-6
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
- Improve test structure and clarity. - Add setup and teardown methods to manage global `$submenu`. - Cover additional scenarios for widget and block theme support.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
The test’s empty submenu allows it to pass even if existing Appearance entries are overwritten; it should seed an entry and verify that Widgets is appended at the next numeric index.
1 open issue
1 resolved since last review
Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>


Trac ticket: https://core.trac.wordpress.org/ticket/57224