The PHP in WP Rig is fundamentally different from how themes have used PHP in the past. If you’ve worked with themes before, you’ll notice this right away. The file and folders structure is new, and what goes inside the files is also new.
So what’s going on? The simple answer is WP Rig has been re-engineered from the ground up to use PHP according to modern standards and best practices. The complicated answer is that the PHP in WP Rig is object-oriented, modular, and uses namespaces for added functionality and security.
If you’re interested in the technical aspects, you’ll find an extensive article explaining all of this in great detail on the WP Rig wiki page. The good news is, you don’t have to be a PHP expert, or an expert on object-oriented PHP to make sense of this new way of doing things. Everything works the same as before, just slightly differently.
In this chapter, we’ll take a deep dive into the PHP of WP Rig to give you a firm understanding of what’s going on, and how everything works so you can work with it.