Categories
Snippets

Dealing with spaghetti code in PHP: Using anonymous functions to extract pieces of template code

Recently I’ve been helping out a friend with trying to make sense of some code and how to modify it to work well with asynchronous calls to the backend. A bonus would be to be able to write it in a more modular and reusable way. The code is a WordPress plugin that was written […]