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_action( 'wp_insert_post', 'gh_new_post_hook' ); | |
function gh_new_post_hook(){ | |
if ( ! is_user_logged_in() ){ | |
return; | |
} | |
$contact = \Groundhogg\get_current_contact(); |
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
/* | |
Plugin Name: LifterLMS Mods | |
Plugin URI: https://academy.groundhogg.io | |
Description: Modify default LifterLMS behaviour. | |
Version: 1.0 | |
Author: Groundhogg Inc. | |
Author URI: http://groundhogg.io | |
License: A "Slug" license name e.g. GPL2 | |
*/ |
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 | |
// Load after Groundhogg | |
use function Groundhogg\is_managed_page; | |
add_filter( 'template_include', 'load_custom_preferences_page', 11 ); | |
/** | |
* Load the custom template from the them folder | |
* |
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 | |
if ( ! defined( 'ABSPATH' ) ) { | |
/** Set up WordPress environment */ | |
require_once( dirname( __FILE__ ) . '/wp-load.php' ); | |
} | |
/** | |
* Here is some pseudo code that will hopefully help you. | |
* Generate broadcast stats from Apache raw access logs... |
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 | |
// Force any outgoing emails from Groundhogg to the go to the given address | |
add_filter( 'groundhogg/email/to', function ( $to_address ){ | |
return 'email.to.force.to@example.com'; | |
} ); |
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 | |
/** | |
* Add CC spouse email address | |
*/ | |
add_filter( 'groundhogg/email/headers', function ( $headers = [] ){ | |
// The contact ID is not passed, so let's get it from the global | |
// Check if the event queue is running, if it's not then this is not relevant... | |
if ( ! \Groundhogg\Queue\Event_Queue::is_processing() ){ |
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 | |
if ( ! function_exists( 'wp_mail' ) ): | |
function wp_mail( $to='', $subject='', $body='', $headers='', $attachments=[] ){ | |
do_action( 'wp_mail_failed', new WP_Error( 'wp_mail_failed', 'Domain based email disabled.' ) ); | |
return false; | |
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 | |
/** | |
* Demonstrates... | |
* | |
* Create a contact record | |
* Add a tag | |
* Remove a tag | |
* | |
* @param $email |
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 unwanted tabs from the tools page | |
* | |
* @param $tabs | |
* | |
* @return array[] | |
*/ | |
function remove_tools_tabs_from_groundhogg( $tabs ){ |
OlderNewer