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 email header to Gravity Forms notification email for GoldMine WebImporting | |
//This adds to all notification emails. Use logic for specific forms via form ID | |
add_filter( 'gform_pre_send_email', function( $email ) { | |
$email['headers']['Content-type'] = 'Content-Type: text/x-gm-impdata'; | |
return $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
// Make private posts and pages available to subscribers | |
function subs_read_private_content(){ | |
$subRole = get_role( 'subscriber' ); | |
$subRole->add_cap( 'read_private_posts' ); | |
$subRole->add_cap( 'read_private_pages' ); | |
} | |
add_action( 'init', 'subs_read_private_content' ); |
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: Allow Subscribers to Read Private Content | |
* Plugin URI: https://brettwidmann.com | |
* Description: A plugin that allows subscribers to read private posts and pages | |
* Version: 1.0 | |
* Author: Brett Widmann | |
* Author URI: https://brettwidmann.com | |
*/ |