This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$terms = wp_get_post_terms( $post_id, 'ticket_category' ); | |
if ( $terms ) { | |
$output = array(); | |
foreach( $terms as $term ) { | |
$output[] = $term->name | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Runs during admin_init hook to determine if our plugin has been upgraded. | |
* | |
* Determine if any processes need to be executed and call them as required. | |
* | |
* - Replace 'mp_plugin_version' with the option name used to store your plugin version in the DB | |
* - Replace 'mp_plugin_version_upgraded_from' with the option name you want to use to store the version upgraded from | |
* - Replace 'MP_PLUGIN_VERSION' with the constant you use to store your plugin version | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Runs during admin_init hook to determine if our plugin has been upgraded. | |
* | |
* Determine if any processes need to be executed and call them as required. | |
* | |
* - Replace 'mp_plugin_version' with the option name used to store your plugin version in the DB | |
* - Replace 'mp_plugin_version_upgraded_from' with the option name you want to use to store the version upgraded from | |
* - Replace 'MP_PLUGIN_VERSION' with the constant you use to store your plugin version | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Find tickets that are set to a status that is no longer registered | |
* and update their status to the value of the $new_status variable. | |
* | |
* @written by Mike Howard | |
* @for KB Support - https://wordpress.org/plugins/kb-support | |
*/ | |
function kbs_update_orphaned_ticket_status() { | |
global $wpdb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.welcome-panel .welcome-register:before { content: "\f481"; } | |
.welcome-panel .welcome-themes:before { content: "\f100"; } | |
.welcome-panel .welcome-plugins:before { content: "\f106"; top: -3px; } | |
.welcome-panel .welcome-docs:before { content: "\f118"; top: -2px; } | |
.welcome-panel .welcome-rate:before { content: "\f155"; top: -2px; } | |
.welcome-panel .welcome-support:before { content: "\f125"; top: -2px; } | |
</style> | |
<h2><?php _e( 'Welcome to the {demo_product_name} (EPD) Demo!', 'easy-plugin-demo' ); ?></h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Redirect agents to the ticket admin screen. | |
* | |
* Effective when agents login via the KBS front end login form. | |
* | |
* @param string $redirect_to The redirect URL | |
* @param int $user_id ID of user logging in | |
* @return string Redirect URL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove registration fields from required fields list. | |
* | |
* @param array $fields Array of required field names | |
* @return array Array of required field names | |
*/ | |
function custom_epd_remove_required_fields( $fields ) { | |
// Uncomment the array values you want to remove from the required fields list |
OlderNewer