Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #57169, comment 12


Ignore:
Timestamp:
01/06/2023 11:03:15 AM (20 months ago)
Author:
manooweb
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #57169, comment 12

    initial v1  
    1 @azaozz Yes! You understood correctly how our language switcher works. As @Chouby explained we create menu item dynamically from the first menu item (first language) and make their ID unique (used in HTML side) by suffixing the language code to the intitial ID. Their parent menu item id is obviously set to the id from the initial menu item. It allows us to really create a submenu then.
     1@azaozz Yes! You understood correctly how our language switcher works. As @Chouby explained we create menu items dynamically from the first menu item (first language) and make their ID unique (used in HTML side) by suffixing the language code to the intitial ID. Their parent menu item id is obviously set to the id from the initial menu item ID. It allows us to really create a submenu then.
    22
    33Your fix works however, IMHO, I wonder if just remove int casting isn't sufficient.