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
//copy HTTP_X_FORWARDED_PROTO config to HTTPS var in $_SERVER | |
if((empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') | |
$_SERVER['HTTPS'] = 'on'; |
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
/* | |
Set reply-to header in emails to get around SMTP issues. | |
I forget why I needed this, but I believe WP Manril or an SMTP app was using the incorrect reply to. | |
*/ | |
function my_pmpro_wp_mail($args) | |
{ | |
if(!empty($args['headers'])) | |
{ | |
foreach($args['headers'] as $header) |
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 | |
/** | |
* This example is to show you the 'niche' options each Paid Memberships Pro - Register Helper Add-on field can take and how to use it. | |
* For more information on the Register Helper Add-on please visit https://www.paidmembershipspro.com/add-ons/free-add-ons/pmpro-register-helper-add-checkout-and-profile-fields/ | |
**/ | |
function my_pmprorh_init() | |
{ | |
//don't break if Register Helper is not loaded |
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 | |
/* | |
Show Members Reports on the WordPress Admin Dashboard. | |
Update the my_pmpro_dashboard_report() function to remove or add core or custom reports. | |
*/ | |
//Create a Dashboard Reports widget for Paid Memberships Pro | |
function add_my_report_dashboard() { | |
if( ! defined( 'PMPRO_DIR' ) || ! current_user_can( 'manage_options' ) ) | |
{ |
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
[row][col medium="4"] | |
[pmpro_account section="profile"] | |
[pmpro_account sections="membership"] | |
[pmpro_account sections="invoices"] | |
[/col][col medium="8"] | |
<div class="pmpro_message pmpro_default"> | |
<h2>My Downloads</h2> | |
<hr /> | |
[row_row][col_col medium="6"] | |
<span class="text-2x">Gold Member Reports</span> |
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
[memberlite_banner background="#EFEFEF"] | |
[row][col medium="12"] | |
[row_row] | |
[col_col medium="8"] | |
<span class="text-3x">Course Overview</span> | |
[wpcourse course="1"] | |
[/col_col][col_col medium="4"] | |
<span class="text-3x">Course Progress</span> | |
[wpcourse_progress courses="1" user_progress="true" user_grade="true" /] | |
[/col_col][/row_row] |
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
[memberlite_banner background="secondary"][row][col medium="4"] | |
[bbp-user-activity title="My Recent Topics" activity_type="topic" show_date="true"] | |
[/col][col medium="4"] | |
[bbp-user-activity title="My Recent Replies" activity_type="reply" show_excerpt="true" show_date="true"] | |
[/col][col medium="4"][otw_is sidebar=otw-sidebar-1] | |
[/col][/row] | |
[row][col medium="12"] | |
<hr /> | |
<h2 class="text-center">[memberlite_btn href="/forums/forum/gold-forum/" text="View Gold Member Forum" style="action"]</h2> | |
[/col][/row] |
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 | |
//paste the following into your PMPro Customizations plugin (http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/) or your active theme's functions.php | |
function pmproc_add_my_message(){ | |
_e( 'my custom text that will change.', 'pmpro'); | |
} | |
add_action( 'pmpro_checkout_before_submit_button', 'pmproc_add_my_message' ); |
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
/* | |
Add the [pmpro_account] shortcode before other bbPress Profile content. | |
*/ | |
function my_pmpro_bbp_template_before_user_profile() { | |
global $current_user; | |
$bbp_user_id = bbp_get_user_id( 0, true, false ); | |
if($bbp_user_id == $current_user->ID && shortcode_exists( 'pmpro_account' )) | |
echo do_shortcode('[pmpro_account]'); | |
} | |
add_action('bbp_template_before_user_profile', 'my_pmpro_bbp_template_before_user_profile', 15, 0); |