This file contains hidden or 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 | |
$args = array ( | |
'method' => 'POST', | |
'body' => array ( | |
'epd_first_name' => 'Joe', | |
'epd_last_name' => 'Blogs', | |
'epd_email' => '[email protected]', | |
'demo_ref' => '310a345749514f0412adabwxfe6ee7f4', | |
'remote_phrase' => '91f6fd676fcc6ba2b537ac278ecc83da', |
This file contains hidden or 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
{ | |
"admin_url": "https://myawesomesite.com/someoneemailcom/wp-admin/", | |
"code": "epd_demo_created", | |
"demo": "EPD", | |
"expires": "2020/11/17 5:08 pm", | |
"first_name": "Joe", | |
"home_url": "https://myawesomesite.com/someoneemailcom", | |
"ID": 444, | |
"last_name": "Blogs", | |
"requires_activation": false, |
This file contains hidden or 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
/** | |
* Replace heading on the demo registration form. | |
* | |
* @param string $heading Heading for registration form | |
* @return string Heading for registration form | |
*/ | |
function custom_epd_set_demo_heading_for_registration( $heading ) { | |
$heading = __( 'Register for my Cool Demo' ); | |
return $heading; |
This file contains hidden or 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 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 | |
*/ |
NewerOlder