Software Engineering in WordPress, PHP, and Backend Development

Search: “namespaces” (Page 10 of 12)

We found 57 results for your search.

Programmatically Set the WordPress User Role

[…] it’s ideally used in the context of a class, but if you wanted to use this procedurally, you’d just drop the word. Secondly, for those who don’t use namespaces, the slash preceding WP_User is telling PHP to use the global namespace so that I have access to the class in WordPress. And here’s the catch: […]

Singleton Design Pattern and Dependency Injection, Part 1

[…] a few things in the code that are worth noting: Because this is an object-oriented pattern, all of the functionality exists in a class. If you’re familiar with namespaces, this can also be placed in a namespace (and often should be if you’re managing your code regarding packages or modularity). The only property the class […]

My Strategy For Using LESS in WordPress

[…] definitions and imports always reside at the top of the file Element-specific code resides in the middle of the file (I’ll touch on this more momentarily). Mixins, Namespaces, and other function-like behavior stays at the bottom of the file For the element-specific code, I usually break this up based on how the markup is […]

A Digression on The State of WordPress

[…] were to ask, say, 50 developers what that would look like, you’d fail to get a consistent answer. Sure, you’d hear things about classes, perhaps something about inversion of control, namespaces, modularity, dependencies, package management, and so on. You know: The thing the cool kids are using these days. But would you hear something that was completely […]

Experiences in Growing a Business in WordPress

[…] If you’re looking for a back-end developer, then the person should have a deep understanding of WordPress hooks, procedural programming, and possibly object-oriented programming (which may include namespaces, autoloading, interfaces, abstract classes, etc.) if that’s how you go about building some of your custom plugins and/or back-end work. And sure, there’s plenty of other things […]

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑