In continuing our discussion of object-oriented programming in WordPress, we need to begin talking about the idea of scope. In short, this refers to the idea as to classes can control how their attributes and functions are accessed (or whether or not they can even be accessed).This is yet another core idea of object-oriented programming after which we should be in good shape to begin working on an actual WordPress plugin.Before moving forward, please note that each article in this series builds on the one before it, so if you’re just joining us, please be sure to check out the previous articles in the series:An IntroductionClassesTypesControl Structures: Conditional StatementsControl Structures: LoopsFunctions and AttributesOnce you’re all caught up, let’s continue our discussion on …

Read original article:

Object-Oriented Programming in WordPress: Scope


Also published on Medium.