Skip to content

Instantly share code, notes, and snippets.


Tom Morton tmort

View GitHub Profile
tmort /
Last active May 4, 2020
WordPress Worker Verify [Reddit Answer] [Updated]

WordPress Verify Worker

This is a response to a reddit post where a user wants to allow public users to verify if a "worker" (employee) works at the company based on an employee ID.

Original Reddit Post
Hello guys,
tmort / docker-compose.override.yml
Last active Oct 22, 2019
Devilbox Override to replace devilbox/docker-apache-2.4 with sixfoot3/docker-apache-2.4
View docker-compose.override.yml
# IMPORTANT: The version must match the version of docker-compose.yml
version: '2.1'
# ------------------------------------------------------------
# Web Server
# ------------------------------------------------------------
image: sixfoot3/docker-apache-2.4:latest
hostname: httpd
tmort / functions.php
Last active May 17, 2019
WordPress custom class per page based on object name.
View functions.php
add_filter('body_class', 'sf3_custom_body_class');
function sf3_custom_body_class($classes){
global $post;
$prefix = 'cpgname_'; //insert your own prefix
if(isset($post->post_type)){ //if a post-type is required
$prefix .= sprintf('%s_%s', $prefix, $post->post_type);
// 'cpgname_page'
tmort / sf3_imgparam.php
Last active Jan 22, 2019
View sf3_imgparam.php
Plugin Name: SF3 Image Param Shortcode
Plugin URI:
Description: Shortcode that allows parameters to be used in an image string.
Version: 0.1.0
Author: Tom
Author URI:
tmort /
Last active May 3, 2019
NSFW Image Blur WP Plugin
tmort /
Last active Jan 2, 2019
Nick83 Help with Filters
tmort / gw-gravity-forms-disable-submit.php
Created Apr 18, 2017 — forked from spivurno/gw-gravity-forms-disable-submit.php
Gravity Wiz // Gravity Forms // Disable Submit Button Until Required Fields are Field Out
View gw-gravity-forms-disable-submit.php
* Gravity Wiz // Gravity Forms // Disable Submit Button Until Required Fields are Field Out
* Disable submit buttones until all required fields have been filled out. Currently only supports single-page forms.
* @version 1.0
* @author David Smith <>
* @license GPL-2.0+
* @link
tmort / Link_to_Author_in_loop.php
Created Dec 21, 2015
WordPress link to author page instead of single post
View Link_to_Author_in_loop.php
tmort / gist:560e551a675b5a4ec329
Created Aug 5, 2015
Codeable Priority Gmail/Google Apps Inbox
View gist:560e551a675b5a4ec329
//Detects message from Codeable that a user has written to you "wrote a message"
tmort / themehelper.php
Last active Feb 9, 2016
WordPress - Find my Template Files
View themehelper.php
// You will need to uncomment the following line
//define('WP_LOCAL_DEV', true);
add_action ('wp_footer', 'view_template_files');
if (! function_exists ('view_template_files')):
function view_template_files () {
if (defined ('WP_LOCAL_DEV') && WP_LOCAL_DEV) {
global $template;
$template_name = basename($template, '.php');
$template_dir = basename(dirname($template));