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: PMPro Customizations | |
Plugin URI: https://www.paidmembershipspro.com/wp/pmpro-customizations/ | |
Description: Customizations for my Paid Memberships Pro Setup | |
Version: .1 | |
Author: Paid Memberships Pro | |
Author URI: https://www.paidmembershipspro.com | |
*/ |
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 | |
global $wpdb, $current_user, $pmpro_invoice, $pmpro_msg, $pmpro_msgt; | |
if($pmpro_msg) | |
{ | |
?> | |
<div class="pmpro_message <?php echo $pmpro_msgt?> printhide"><?php echo $pmpro_msg?></div> | |
<?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
<?php | |
/* | |
Custom shortcode to show membership account information | |
This file should be place in your theme/child-theme directory inside the folder | |
/your/site/wp-content/themes/your-theme/paid-memberships-pro/pages/ | |
If using a customization plugin to replace template files instead of overriding through theme files | |
follow the directions on here - | |
https://www.paidmembershipspro.com/documentation/templates/customizing-via-a-custom-plugin/ |
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 | |
/** | |
* Change or translage some text strings for PMPro Sponsored Members | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ |
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 | |
/** | |
* Redirect wp-admin profile to BuddyPress Profile | |
*/ | |
function my_profile_redirect() { | |
global $current_user; | |
if(defined('IS_PROFILE_PAGE') && !current_user_can('manage_options')) { | |
wp_redirect( bp_loggedin_user_domain() ); | |
exit; |
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 | |
global $wpdb, $pmpro_currency_symbol, $current_user; | |
if(isset($_REQUEST['report'])) | |
$report = $_REQUEST['report']; | |
else | |
$report = false; | |
if($report && $report != "all") | |
{ |
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
# DISABLE CACHING | |
<IfModule mod_headers.c> | |
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" | |
Header set Pragma "no-cache" | |
Header set Expires 0 | |
</IfModule> | |
# You can customize the list of file types to suit your specific needs. | |
<FilesMatch "\.(css|flv|gif|htm|html|ico|jpe|jpeg|jpg|js|php|png|pdf|swf|txt)$"> | |
<IfModule mod_expires.c> |
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 | |
/* | |
* Load custom javascript according to the level a user is subscribing to | |
* on the Paid Memberships Pro checkout page. | |
* for additional info on loading javascript in WordPress see | |
* https://developer.wordpress.org/reference/functions/wp_enqueue_script/ | |
* | |
*/ |
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 // do not copy this line | |
/** | |
* Use PMPro Register Helper to add PMPro Billing Address fields to the edit user page for admins. | |
*/ | |
/** | |
* show_pmpro_address_fields_on_edit_profile Grabs the values from the billing fields which get filled in during checkout and displays on User Profile. | |
* | |
* @return array Array of Register Helper field objects | |
*/ |
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 method has been replaced. | |
* See: https://gist.github.com/ipokkel/83f4812390c3647374ac790faaa000ba | |
* | |
*/ |