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
| 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 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
| /* | |
| 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 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
| 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 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
| /* | |
| 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 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
| 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"); | |
| } | |
| } |
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 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 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
| function my_pmpro_level_cost_text($r, $level, $tags, $short) | |
| { | |
| //remove the existing string/level cost text | |
| $r = ''; | |
| //initial payment | |
| if(!$short) | |
| $r = sprintf(__('The price for membership is <strong>%s</strong> now', 'pmpro'), pmpro_formatPrice($level->initial_payment)); | |
| else | |
| $r = sprintf(__('<strong>%s</strong> now', 'pmpro'), pmpro_formatPrice($level->initial_payment)); |
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
| /* | |
| Modified to transfer over unused days from old level into new level. For example: | |
| Level 1 expires in 30 days and Level 2 expires in 180 days. If a members signs up | |
| for Level 1 and 5 days in decides to up upgreade to Level 2, thier new expiry date | |
| will be (30 - 5) + 180 days. | |
| */ | |
| //if checking out for the same level, add remaining days to the enddate | |
| function my_pmpro_checkout_level($level) | |
| { | |
| global $pmpro_msg, $pmpro_msgt; |
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
| 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(); | |
| $fields[] = new PMProRH_Field( |