Menu

Snippets

Yet another programmer blogging about code

Subresource integrity for WordPress scripts and stylesheets

December 3, 2018

When we load resources from other websites, we trust those sites to deliver something safe. Use subresource integrity to ensure authenticity.

PHP version compatibility test with a few files on 5.2

November 5, 2018

Check for PHP version compatibility problems in WordPress plugins, with support for just a few files running in PHP 5.2.

Enqueue scripts on the WordPress front end and login page

August 8, 2018

If you want to load a script or stylesheet on both the WordPress front end and login page, here’s how to register it once and load it in the appropriate places.

Gravity Forms and WooCommerce country codes

June 1, 2018

Gravity Forms and its User Registration add-on make it really easy to create custom registration pages. One problem you’ll hit if you combine that with WooCommerce is that WooCommerce uses standard country codes, but Gravity Forms uses country names. But that can be fixed.

Restrict Amazon SES by domain name

April 9, 2018

Amazon Simple Email Service (SES) makes it easy, and cheap, to send emails reliably from a website. Here’s how to set it up for use with multiple domains.

Select PayPal landing page for Easy Digital Downloads

February 19, 2018

Easy Digital Downloads comes with a PayPal Standard payment gateway, which lets us get our store up and selling quickly and cheaply. Let’s get it to select a better landing page with PayPal Standard, and make our credit card customers happier.

Localising a Gravity Forms add-on

January 25, 2018

The Gravity Forms Add-on Framework makes the job of creating an add-on really easy. But there’s a couple of problems with letting it load our text domain for us:

Configure WP Super Cache

January 2, 2018

Page caching is important for the performance of your WordPress website. Here’s how to configure WP Super Cache to serve up your site’s content from the cache, without bogging down your server.

Payment receipts with Gravity Forms and eWAY

November 14, 2017

Gravity Forms email notifications can be used to send simple payment receipts for eWAY transactions.