Using classes instead of global functions in functions.php
Using a class for encapsulation is a very common approach by a number of developers for plugins. I do this, and I do find it cleaner. But for plugins. Themes are more procedural by nature. We don’t do it for default WordPress themes because it raises the barrier to entry. The functions are quite simple. … Read more