Small bug (.attr(‘href’) is not the slug)
-
Hi,
and thank you for this wonderful plugin. It works exceptionally well, except for a small bug that affects some menu entrys.
In assets/js/admin-popups.js you’re creating the checkbox values with
let key = $( this ).attr( 'href' );
(lines 40 and 85)That is not always the correct slug. Then some menu items won’t be always shown or always hidden, although they were selected. You can confirm that by adding “Auto hide menu” to the list of always hidden menu items. It won’t work.
The correct slug is in the
<li>
class, e.g.toplevel_page_aham_settings
-> the correct slug isaham_settings
. So to fix the bug you would have to change above line tolet key = $(this).parent().attr('class').match(/toplevel_page_(.+?)(?=\s|$)/);
key = key ? key[1] : $( this ).attr( 'href' );
- The topic ‘Small bug (.attr(‘href’) is not the slug)’ is closed to new replies.