For the sake of completeness, here’s the plugin structure (I said naming conventions needed to be respected, without naming the files, my bad):
Folder name : lancelo-hivepress
/lancelo-hivepress.php
+/includes/controllers/class-lancelo.php
+/includes/templates/class-aff-page.php
If you want to add the .current-menu_item class to the selected menu :
// search in all links the one having "Affiliation" as text attribute,
//then go up in the DOM and apply css class to its parent (<li>)
jQuery(document).ready(function($) {
$('a').filter(function(index) { return $(this).text() === "Affiliation";}).parent().addClass('current-menu-item');
});
This javascript snippet needs to be injected when browsing this page only, of course, using this trick for instance.
That’s the best I could up with, but since nobody else provided a solution, here’s mine.
