Blog

WordPress User Notices

When working in WordPress’ Gutenberg editor, there may be times when we wish to notify the admin user of a change or response to an action. For example, if we have a custom block that makes a remote API request, we might want to notify the user about the result of that request. Luckily, WordPress …

PHP Null Coalescing Operator

Until recently, I often found myself using conditional logic with isset() in cases like the following: or perhaps using a ternary: The above examples work just fine, and if you’re using an older version of PHP, these might be some of your best options. However, users of PHP 7.0 and newer can take advantage of …