In the early ’80s, my father trained countless Cobol programmers. Today I write WordPress plugins, but there’s one thing that our work has in common.
As part of a recent Sensei update we added some custom capabilities to the editor role, but we discovered that some people have deleted that role from the database as a way of cleaning up unused data on their sites. This meant that our add_cap() calls were causing fatal errors for these sites. Here’s how we solved this problem for ourselves.