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
/* | |
* Pre select the PayPal Express payment option (vs credit card) when using PayPal Website Payments Pro | |
*/ | |
function pre_select_paypal() | |
{?> | |
<script> | |
jQuery(document).ready(function(){jQuery("input[name=gateway][value='paypalexpress']").click();}); | |
</script><?php | |
} |
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
function my_pmpro_post_membership_levels_header($defaults) | |
{ | |
$defaults['membership_levels'] = 'Membership Levels'; | |
return $defaults; | |
} | |
function my_pmpro_post_membership_levels($column_name, $post_ID) | |
{ | |
if ($column_name == 'membership_levels') | |
{ |
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
function my_pmpro_show_next_payment_date() | |
{ | |
$next_date = pmpro_next_payment(NULL, "success", "date_format"); | |
if($next_date) | |
echo $next_date; | |
else | |
echo "---"; | |
} |
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
function my_pmprorh_init() | |
{ | |
//don't break if Register Helper is not loaded | |
if(!function_exists("pmprorh_add_registration_field")) | |
{ | |
return false; | |
} | |
//define the fields | |
$fields = array(); | |
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
/* | |
Delay start of subscription to first of next month if current day of the month is less than the cut off day. | |
Otherwise start on the first of next next month. For example: A member signs up on November 6, and the ‘cutoff’ date is Nov 15. | |
Then they will be charged on Dec 1. But someone who signs up on Nov 17 will be charged on January 1. | |
Must have PMPro Subscription Delays (http://www.paidmembershipspro.com/add-ons/plus-add-ons/subscription-delays/) | |
installed and activated | |
*/ | |
function my_pmprosd_modify_start_date($start_date, $order, $subscription_delay) | |
{ |
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
function my_pmpro_member_startdate($start_date, $user_id, $level_id) | |
{ | |
$date = strtotime("10 December 2015"); | |
return $date; | |
} | |
add_filter('pmpro_member_startdate', 'my_pmpro_member_startdate', 10, 3); |
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
/* | |
Use Hide Admin Bar from Non-Admins(https://wordpress.org/plugins/hide-admin-bar-from-non-admins/) | |
to ensure users don't see the admin bar. The code below will hide "Show Toolbar when viewing site" | |
on themed profiles with Theme My Login. | |
*/ | |
tr.tml-user-admin-bar-front-wrap { | |
display: none; | |
} |
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 | |
/* | |
This shortcode will display the profile for the user ID specified in the URL and additional content based on the defined attributes. | |
*/ | |
function pmpromd_profile_preheader() | |
{ | |
global $post, $pmpro_pages, $current_user; | |
if(!empty($post->ID) && $post->ID == $pmpro_pages['profile']) | |
{ | |
/* |
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
function exclude_category_from_pmpro_limit_views() | |
{ | |
global $post; | |
if(has_category("events", $post) && is_user_logged_in()) | |
{ | |
add_filter("pmpro_has_membership_access_filter", "__return_true"); | |
} | |
} |
OlderNewer