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
/* CSS Document */ | |
#pmpro_payment_method span a { | |
background-position: left bottom; | |
background-size: contain; | |
background-repeat: no-repeat; | |
display: inline-block; | |
margin-left: 1%; | |
max-width: 300px; | |
padding-bottom: 60px; | |
text-align: left; |
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 | |
//Removes the replies filter in the bbPress Add On for Paid Memberships Pro. | |
function remove_my_pmprobb_auth_reply_view_filter() | |
{ | |
remove_filter( 'bbp_get_reply_content', 'pmprobb_auth_reply_view'); | |
} | |
add_action('init', 'remove_my_pmprobb_auth_reply_view_filter'); |
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 | |
/* | |
Use this recipe to add the [pmpro_member_profile] to your bbPress user profile page. | |
*/ | |
function insert_pmpro_member_profile_shortcode() { | |
$user_id = bbp_get_user_id( 0, true, false ); | |
echo do_shortcode( '[pmpro_member_profile user_id="' . $user_id . '"]' ); | |
} | |
add_action( 'bbp_template_before_user_profile', 'insert_pmpro_member_profile_shortcode', 15, 0 ); |
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 | |
/** | |
* Use this recipe to redirect the Profile page as defined under Memberships > Page Settings to the member's | |
* bbPress User Profile when using the Member Directory and Profile Pages Add On in conjunction with bbPress. | |
* | |
* You must set a placeholder page under Memberships > Page Settings > Profile in order for this redirect to work. | |
*/ | |
function redirect_profile_page_to_bbpress_user_profile() { | |
global $pmpro_pages; | |
if ( ! empty( $pmpro_pages ) && ! empty( $pmpro_pages['profile'] ) && is_page( $pmpro_pages['profile'] ) ) { |
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 | |
/** | |
* Notification bar when post views are being tracked and restricted by the Limit Post Views Add On | |
* Requires: https://www.paidmembershipspro.com/add-ons/pmpro-limit-post-views/ | |
*/ | |
function add_notification_bar_for_limit_post_view_alt() { | |
// check for past views and if we are on a single page. needs to check if the post is locked at all by default. | |
if ( ! empty( $_COOKIE['pmpro_lpv_count'] ) && is_single() ) { | |
global $current_user; |
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 | |
/** | |
* Notification bar when post views are being tracked and restricted by the Limit Post Views Add On | |
*/ | |
function add_notification_bar_for_limit_post_view() { | |
// check for past views and if we are on a single page. needs to check if the post is locked at all by default. | |
if ( ! empty( $_COOKIE['pmpro_lpv_count'] ) && is_single() ) { | |
global $current_user; | |
// Check cookie for views value. |
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 | |
/** | |
* Trigger a Popup Maker to display on the redirected page once the post views limit is reached. | |
* Requires: https://www.paidmembershipspro.com/add-ons/pmpro-limit-post-views/ and https://wordpress.org/plugins/popup-maker/ | |
*/ | |
function trigger_popup_maker_with_limit_post_views() { | |
// Check cookie for views value and compare to limit based on visitor/user. | |
if ( ! empty( $_COOKIE['pmpro_lpv_count'] ) ) { | |
global $current_user; |
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 | |
/** | |
* Add Shipping Address to membership checkout only if Addon Package is included. | |
*/ | |
function hide_pmpro_shipping_level_1( $level_id ) { | |
if ( ! empty( $_REQUEST['ap'] ) ) { | |
$hideshipping = false; | |
} else { | |
$hideshipping = true; | |
} |
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 | |
/** | |
* Add Shipping Address to membership checkout only if Addon Package is included for levels 4, 5, and 9. | |
*/ | |
function hide_pmpro_shipping_level_4( $level_id ) { | |
if ( ! empty( $_REQUEST['ap'] ) ) { | |
$hideshipping = false; | |
} else { | |
$hideshipping = true; | |
} |
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 | |
/** | |
* Change term "membership" to "subscription" for plugin generated text | |
*/ | |
function my_pmpro_gettext_membership( $translated_text, $text, $domain ) { | |
if ( $domain == 'paid-memberships-pro' ) { | |
$translated_text = str_replace( 'Membership', 'Subscription', $translated_text ); | |
$translated_text = str_replace( 'membership', 'Subscription', $translated_text ); | |
} | |
return $translated_text; |