I am adding a submenu page as follows:
add_submenu_page( $slug, __('Categories','acs'), __('Categories','acs'), $cap, 'edit-tags.php?taxonomy=acs-field-group-category&post_type=acs-field-group' );
But the submenu does not display as active when selected.
So after wondering... I went into WP Core and added a var dump at wp-amdin/menu-header.php
Right where the check is made, to add the .current CSS classname.
var_dump($submenu_file);
var_dump($sub_item[2]);
And... the output is a mystery:
string(77) "edit-tags.php?taxonomy=acs-field-group-category&post_type=acs-field-group"
string(73) "edit-tags.php?taxonomy=acs-field-group-category&post_type=acs-field-group"
Same string, different length!
Of course it must be some encoding game, but I'm using phpStorm with encoding set to UTF-8.
I don't know how to get over this, help will be appreciated.