How can I code the following snippet in a more object-oriented way?[ad_1] I’m trying to teach myself how to approach WordPress in a more OOP way.…