Add a check for the nav_menus panel.#2227
Conversation
| <?php | ||
| $nav_menus = $this->manager->get_panel( 'nav_menus' ); | ||
|
|
||
| if ( $nav_menus ) { |
There was a problem hiding this comment.
hi thanks for the patch, tested and it works on my side, just one thought:
I think the if controle should wrap the span node too, to avoid orphan node https://prnt.sc/26tbhbx . thanks.
There was a problem hiding this comment.
Hi @mauriac, thanks for the feedback! I couldn't reproduce the orphan node.
Some questions:
- What OS and browser are you using?
- What theme are you using?
- What steps did you take to find this issue?
I'm planning on a slightly different approach, but I want to make sure I can reproduce this issue and make sure that the new approach also removes this issue.
There was a problem hiding this comment.
- mac os, chrome
- TT2
- same steps to reproduce initial issue, but now you run the steps after applied your patch, then launch page inspection from chrome and search "customize-action" you will find what i've arrowed here. May be I wasn't clear; by "orphan" i was mean 'empty' node. And I think even without test, this is an evidence, if $nav_menus is empty nothing will not be displayed and the 'span' before the php code will be generated for nothing I think.
Hope you understand me.
|
hi thanks for the patch, tested and it works on my side, just one thought: on line 1158, I think the "if" controle should wrap the span node too, to avoid orphan node https://prnt.sc/26tbhbx . thanks. |
Trac ticket: https://core.trac.wordpress.org/ticket/54905