As far as programming languages go, PHP gets major updates fairly often. This means that as time goes on, WordPress needs to update the minimum required PHP version to keep up with those updates and provide users with a better experience. While you’re reading this, WordPress is making a jump to PHP version 5.6. It’s not the latest PHP version, but it’s still a major change that’ll impact the way WordPress users do things. There’s no need to worry, though: this update is a good thing. In this article, we’re going to break down the reasoning for the jump in […]
Doc Pop’s News Drop: WordPress 5.2 is here
Doc Pop’s WordPress News Drop is a weekly report on the most pressing WordPress news. When the news drops, I will pick it up and deliver it right to you. WordPress 5.2 is here and full of new features. In this week’s News Drop we talk about Site Health, Fatal Error Recovery Mode, and support for cryptographically-signed updates. Love WordPress News but hate reading? My name is Doc and this is Doc Pop’s News Drop. Site Health section of the admin panel, support for a modern cryptography library, and support for cryptographically-signed updates. WordPress 5.2 launches today, May 7th and […]
Getting Started With JavaScript (And How It Compares to PHP)
JavaScript has been in the news a lot lately, and for good reason. There’s a growing need for WordPress developers to “learn JavaScript deeply.” However, making the switch from PHP can seem overwhelming at first glance. In our opinion, even if PHP is your only programming language, you should find the switch to JavaScript comfortable enough to begin hacking away at a few scripts in no time. Once you understand how the basic building blocks of JavaScript are put together, you’ll have a solid grounding that will enable you to explore the more complex aspects of the language. In this […]
Implementing the Repository Pattern in WordPress
One of the many advantages of object-oriented programing is that it allows us to write more descriptive code — code that by design has to be used a specific way. This helps move us from conventions to programmed rules in our code. That’s good, but it can complicate things. Arrays and standard class objects can hold any data, which is super-flexible but also leads to poorly-formed systems. The repository pattern gives us a way to have objects that can contain arbitrary data, but also enforce rules. I’ve written about other design patterns before. Like any other software design principle, following […]
How to use The Decorator Pattern in PHP
As we progress in learning object-oriented programming (OOP) as PHP developers, the uses of certain established patterns become more important, such as one that I’v been using lately, the decorator pattern. On a textbook level, the decorator pattern lets us change a class when it runs, while extending a class allows us to change it when it is designed. That difference seems trivial, but it has important consequences on the readability and scalability of your applications. The decorator pattern is a different way of adding functionality to a class. Instead of extending it using inheritance — class A extends class B […]
The Newbie Developer’s Guide to WordPress’ PHP Coding Standards
Part of WordPress’ success stems from how easy it is for new developers to contribute to the platform. However, on this type of collaborative project it’s particularly important for coding styles to remain consistent. Without set guidelines, the code can quickly become unmanageable. The WordPress PHP coding standards emerged to help address this problem. Following these standards results in code that is easier for contributors to read, update, and manage. As an independent developer, learning standards like these will help you write stronger code as well. In this article, we’ll introduce you to the WordPress PHP coding standards and explain why […]
Level Up Your Skills with Our Guide to Object-Oriented PHP [Ebook]
PHP is one of the most widely used web development languages in the world. Not only is more than 80 percent of the web is using it, but it is also the language of WordPress. As a WordPress developer, it’s important to have understand PHP. If you’re just starting out as a WordPress developer, the concept of object-oriented PHP may seem daunting. We put together a comprehensive ebook to help you get started with object-oriented PHP. Download the Ultimate Guide to Object-Oriented PHP This free ebook, written by Torque contributor Josh Pollock, is a great way for PHP beginners to level up […]
All You Need To Know About PHP 7 For WordPress
We all know 2016 was the year of learning JavaScript deeply, but in his annual State of the Word, Matt Mullenweg presented developers with a new challenge, PHP. Specifically PHP 7. WordPress is moving toward updating everything to 7, and you don’t want to be left behind. We’ve created a guide to get you on the right step with PHP 7 and the new year. Whether you’ve already adopted the update or have just started looking into it, these posts will help you stay current. An Introduction to PHP 7 in WordPress Still don’t understand the PHP 7 hype? This […]
Singletons In WordPress: Good Or Evil?
Whenever object-oriented PHP is discussed in terms of WordPress development the subject of singletons often comes up. In fact, I’ve covered them twice here on Torque. In my article on design patterns and then with Carl Alexander in my article on leveling up as a PHP developer. The singleton pattern is used in the design of a class to make it so only one single instance of that class will ever exist. Some people believe that singletons are bad or are an anti-pattern. I disagree. While I am suspicious of singletons and think they are way over-used in WordPress development […]
PHP Fundamentals For WordPress Developers
Like many WordPress developers, the first time I wrote PHP, I didn’t know anything about PHP or software development in general. As I started to tackle more advanced concepts, however, I struggled because I never learned the fundamentals of PHP that were assumed in the materials I encountered. Regardless of your stage in your process of learning PHP as a WordPress developer it’s important to make sure you know the basics. In this article, I will discuss PHP fundamentals: variables, constants, data types, functions, and scope. This knowledge will equip you to learn PHP and other languages, as most of […]
No Comments