i tried the above code and it works well. i am wondering if it could be extended to hiding menu items which arent from stock wordpress but from plugins...?
for example if you would also like to hide "Yoast SEO" in the admin menu from the editor role...?
i ofc tried to just add "__('Yoast SEO')" to the list, but yea... that doesn't do anything :-)
help would be appreciated :-)