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
// Turn debugging on by setting value to "true" | |
define('WP_DEBUG', true); | |
// Turn off the display of error messages on your site | |
define('WP_DEBUG_DISPLAY', false); | |
// Log all errors to /wp-content/debug.log | |
define('WP_DEBUG_LOG', true); |
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
define( 'WP_DEBUG', true ); |
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 | |
/** | |
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
* A simple gist that changes "Invoice #:" to "Receipt #:" when printing an exsisting order. | |
* Copy the code below into your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_text_strings( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'Invoice #: ' : |
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
/* PMPro Levels Page - Button Styling */ | |
a.pmpro_btn.pmpro_btn-select { | |
text-decoration: none; | |
text-transform: uppercase; | |
background-color: #D32D0B; | |
color: #ffffff; | |
border: none; | |
} | |
/* PMPro Levels Page - Table Background Color */ |
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
// Change 'Membership' to 'Subscription' for Paid Memberships Pro. | |
function my_gettext_membership( $translated_text, $text, $domain ) { | |
if( "paid-memberships-pro" == $domain ) { | |
$translated_text = str_replace( "Membership Level", "Subscription", $translated_text ); | |
$translated_text = str_replace( "membership level", "subscription", $translated_text ); | |
$translated_text = str_replace( "membership", "subscription", $translated_text ); | |
$translated_text = str_replace( "Membership", "Subscription", $translated_text ); | |
} | |
return $translated_text; | |
} |
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 tag. | |
/** | |
* Replace all spaces with an underscore when new users register for Paid Memberships Pro. | |
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_custom_user_registration_changes( $userdata ) { | |
$userdata['user_login'] = str_replace(' ', '_', $userdata['user_login'] ); |
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 tag. | |
// Copy the function below into your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
// Use the shortcode [membership_level] to display the user's current membership level. | |
function pmpro_membership_level_shortcode( $atts ){ | |
if(is_user_logged_in() && function_exists( 'pmpro_hasMembershipLevel' ) && pmpro_hasMembershipLevel()){ | |
global $current_user; | |
$current_user->membership_level = pmpro_getMembershipLevelForUser($current_user->ID); | |
return sprintf(__( "Your current level is: %s", "pmpro" ), $current_user->membership_level->name); |
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 //careful not to duplicate this tag in your customizations.functions.php file | |
/* | |
* Change the word "Howdy" to "Hello" in your WordPress Admin Bar. | |
* Add to a Customization Plugin of your choice. | |
* If a PMPro Member, you can add code to a Paid Memberships Pro Customizations Plugin. | |
*/ | |
function wp_admin_bar_my_custom_account_menu( $wp_admin_bar ) { | |
$user_id = get_current_user_id(); | |
$current_user = wp_get_current_user(); |