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
<?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_additional_flags.php
Last active April 30, 2020 22:45
Adding IMAP flags within KB Support - Email Support
/**
* Add novalidate-cert flag to mailbox connection for KBS Email Support.
*
* This flag is required if your IMAP/POP3 mail host does not have a valid SSL certificate.
*
* Add this code to your child theme functions.php file, or to a custom plugin.
*/
function kbs_ems_additional_flags( $flags ) {
$flags[] = 'novalidate-cert';
@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 ) {