Sometimes a plugin or theme needs a new page in the admin area, this is post will explain how to do this. There are a number of functions that can be called to make this happen, but they all use add_menu_page or add_submenu_page. Want to see how this all fits together? The code is on… Continue reading How to Add WordPress Admin Pages
Author: Christopher Davis
How to Bootstrap a WordPress Plugin
When WordPress fires up one of the steps along the way is looking for and loading plugins. This happens before the current theme is loaded and after most of the core and must-use plugins are loaded and setup. This process can be seen in wp-settings.php. The gist is that the plugin file is simply loaded… Continue reading How to Bootstrap a WordPress Plugin
My Favorite Type of Documentation
With applications or libraries its easy to lose sight of the forest for the trees. It's easy to get lost in the details and forget the broad strokes of what the applicaiton or library or module is trying to accomplish. If that's true for the authors of said application or library, imagine how a user… Continue reading My Favorite Type of Documentation
Building Your Own (JavaScript) Test Doubles
A test double is an object or function that behaves like a real piece of code, but is, instead, solely for a test. It mimics the functionality of something, without being that something. There are plenty of frameworks to deal with test doubles in JavaScript (like sinon), but it's helpful to the various types of… Continue reading Building Your Own (JavaScript) Test Doubles
The Two Types of Interesting Problems
The first type of interesting problem is the one everyone talks about: novel problems. New stuff, stuff that hasn't been tackled before -- either by the person doing it or the world as a whole. These are interesting for obvious reasons: it's fun to experiment -- to try new things and push both individual and… Continue reading The Two Types of Interesting Problems
One Way to Manage Secrets in Dockerized Applications
Putting configuration in the environment is a fairly well acknowledged best practice now. That configuration often includes secrets. But environment variables in container images -- like the docker ENV stanza -- are not really secure. They are built as part of the image, after all, so anyone with access to the image can get at… Continue reading One Way to Manage Secrets in Dockerized Applications
AWS Service Policies vs IAM Permissions
AWS is, at best, complicated. Part of that complexity is that there are often seems to be more than one way to accomplish a goal. Service policies and IAM permissions are a great example of this. Both seem to accomplish the same thing (permissions), but serve different purposes. Service policies is probably not an official… Continue reading AWS Service Policies vs IAM Permissions
Multi-Stage Docker Builds for PHP Applications
The neatest thing I've discovered about Docker in the last few months are multi-stage builds. To put it simply a multi-stage build is a Dockerfile with two or more FROM stanzas. Let's explore what that means for a PHP project. First, a goal: the images built for any application should 100% ready to go. That… Continue reading Multi-Stage Docker Builds for PHP Applications
Parameter & Result Objects: More Than Grouping Values
A parameter object replaces one or more parameters to a method with a single object instance. A result object is a object created specifically for a return value from a method. Parameter Objects Changing a method to accept a parameter object is a common refactoring for grouping parameters that belong together. Unfortunately that's not the… Continue reading Parameter & Result Objects: More Than Grouping Values
PHPSecLib SFTP Error Handling
In the marketing world, the de facto way to send data around is a file. Usually via SFTP -- five years ago it was almost 100% FTP. Occasionally a third party tool will have an API, but clients will almost always only deliver things like product feeds or first party revenue data via a file.… Continue reading PHPSecLib SFTP Error Handling




