With the size of the WordPress project and the gigantic ecosystem created by it, it’s important we (as developers) do certain things the same. Following the WordPress coding standards makes us ‘format’ our code all in the same way, while still giving us all the room for our own creativity. In this post I want to highlight some PHP coding standards, if you’re interested in the full list you can view the Handbook page on WordPress PHP coding standards here.
Continue Reading…
Category Archives: WordPress Development
Adding WooCommerce settings
Instead of writing up another ‘how to’ post explaining what every filter does, I decided to just share a class I’ve created that can be reused for adding your own settings to WooCommerce with settings tab to the WooCommerce settings page.
Continue Reading…
Display all hooks that run on your page
Add the following to your functions.php to display a sequential list of all actions that run on the page you’re viewing.
Continue Reading…
Increase your WordPress plugin performance
Poor plugin performance can be caused by many things, but there is one thing that will definitely increase your plugin’s performance: conditional loading. Allot of WordPress plugins load their code on every page, or actually on every request.
Continue Reading…
Trigger plugin activation on new site in a WordPress Network
Allot of plugin have a function that is triggered when the plugin is activated. This ‘activation’ function allows the plugin to setup itself, e.g. create a custom table or set some options in the options table. This works fine in a ‘normal’ WordPress website, but when you create a new site in a WordPress Network website these plugin activation functions are not triggered. Continue Reading…