Skip to content

Instantly share code, notes, and snippets.

View mikeyhoward1977's full-sized avatar
🏠
Working from home

Mike Howard mikeyhoward1977

🏠
Working from home
View GitHub Profile
@mikeyhoward1977
mikeyhoward1977 / mikes-plugins-wordpress-boilerplate.php
Last active April 23, 2018 16:07
WordPress Plugin Boilerplate
<?php
/**
* Plugin Name: Mikes Plugin Boilerplate
* Plugin URI: https://mikesplugins.co.uk
* Description: A basic boilerplate for writing WordPress plugins
* Version: 1.0
* Date: 23 April 2018
* Author: Mike Howard
* Author URI: https://mikesplugins.co.uk/
* Text Domain: mikes-plugins
<?php
$terms = wp_get_post_terms( $post_id, 'ticket_category' );
if ( $terms ) {
$output = array();
foreach( $terms as $term ) {
$output[] = $term->name
}
@mikeyhoward1977
mikeyhoward1977 / kbs-ems-stop-processing-email-addresses.php
Last active March 17, 2018 23:07
KBS Email Support - Stop email processing if sender matches address
<?php
/**
* Do not process emails from specified addresses
*
* @param bool $process True to process, false to halt
* @param array $data Array of email data
* @return bool
*/
function kbs_ems_stop_processing_email_addresses( $process, $data ) {
if ( $process ) {