I’m currently working on two applications that I’m building on top of WordPress (of which I hope to share once they’re complete).
Both projects have views – basically pages with templates – that need to be created when the application is installed and the pages aren’t meant to be deleted.
Though I’ve covered how to programmatically create a post in WordPress, I thought I’d share a quick example of how you can programmatically prevent a page from being deleted in WordPress, too.