Code Tip: Understanding the Ternary Operator
Let’s talk about the ternary operator. It can be confusing for many. In this video, Tonya puts the if/else side-by-side with its equivalent ternary to help you know and understand it. The alternate syntax tip is found here. This tip is valid for JavaScript and PHP.
A better alternative to "return early" - PHP / WordPress edition
PHP Namespaces for WordPress - a No Nonsense Guide
PHP namespaces are easy to use and make coding faster & easier. They work like a folder structure. Learn how to use them in WordPress plugins & themes.
[Tutorial] How to install ImageMagick
Installing ImageMagick is really pain on other systems. However, it is trivial with Laragon if you follow these below steps (works with both Apache & Nginx): Download links: PHP Extension (PECL): https://pecl.php.net/package/imagick/3.4.3/windows Imagick...
Code Review Part 1: Fixing Design Flaw with the "Return Early" Strategy
While reading Josh Pollock’s first article in his Advanced OOP for WordPress series, I noticed opportunities to improve his code’s quality and performance. So I reached out to him. As a fellow educator, he suggested that I do a code review and then publish my insights in a series of articles here on Torque as …
WPTRT/WordPress-Coding-Standards
WordPress-Coding-Standards - PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions
How To Enforce Code Standards In WordPress Development Using Composer
In my last article for Torque, I wrote about why I think that for PHP code following the coding standards set by the PHP community make more sense than those set for WordPress core. These standards are based on serving the needs of an existing legacy code base, limited to language features that are 10 …
Don't Follow WordPress Coding Standards
When I started in WordPress development, I was very lucky that I found good quality tutorials by experienced developers such as Tom McFarlin and Pippin Williamson, who understood the ecosystem well. The more I learned, the more I came to value sticking to “The WordPress Way”. Since I learned plugin development by working as a …
[Tutorial] How to install Imagick
Installing Imagick is really pain on other systems. However, it is trivial with Laragon if you follow these below steps (works with both Apache & Nginx): Download links: PHP Extension (PECL): https://pecl.php.net/package/imagick/3.4.3RC1/windows Imagick ...
Laragon - Turns your computer into a powerful server
A lightweight, fast and convenient modern LAMP Server with Redis and Memcached, extremely high performance. Laragon'll turn your computer into a powerful server
Basic PHP Design Patterns For WordPress
Make your life as a developer simpler with these basic PHP Design Patterns. Stop repeating your moti...
Be Awesome in PHPStorm
The web has changed. No longer are we writing static HTML, throwing it on Geocities, and then callin...
Examples of Refactoring PHP Code for Better Readability
Refactoring code is when you restructure existing code without changing its external behavior. Basic...
Composer
Teh Playground!
PHP testbed
PSR-2: Coding Style Guide - PHP-FIG
This guide extends and expands on PSR-1, the basic coding standard. The intent of this guide is to r...
Blackfire Profiler - Fire up your PHP App Performance
Blackfire Profiler: Fire up your PHP Apps Performance