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 function simply edits the text 'Make a Gift' for PMPRO Donations Add-On | |
Please paste this function in your functions.php or custom plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function pmpro_donations_change_text( $change_text, $text, $domain ) { | |
switch ( $change_text ) { | |
case 'Make a Gift' : | |
$change_text = __( 'Make A Legislative Contributionn', 'pmpro-donations' ); //edit 'Make A Legislative Contribution' to edit the text output of 'Make a Gift' |
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 | |
// Add this code below to your PMPro Customizations plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
add_filter( 'gettext', 'change_my_text_example', 20, 3 ); | |
/** | |
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
*/ | |
function change_my_text_example( $translated_text, $text, $domain ) { |
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. | |
/** | |
* This recipe adds custom CSS for non-logged in users on screens larger then 768px. | |
* | |
* 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 | |
// Adds the BGN currency to currency list. | |
function pmpro_currencies_bulgarian( $currencies ) { | |
$currencies['BGN'] = __( 'Bulgarian Lev', 'pmpro' ); | |
return $currencies; | |
} | |
add_filter( 'pmpro_currencies', 'pmpro_currencies_bulgarian' ); |
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 | |
/** | |
* Set a custom date format for some PMPro date email data variables. | |
* | |
* Set your custom date format in the $date_format variable. | |
* See https://www.php.net/manual/en/datetime.format.php for more information. | |
* | |
* 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. |
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 "Pay by Check" to "Pay by Bank Transfer". | |
* 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 'Pay by Check' : |
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 | |
/** | |
* Restrict Membership Signup by Email Domain & Level | |
* Make sure to edit the $valid_domains array defined further below | |
* to include only the domains you'd like to allow. | |
* | |
* Add this code to a custom plugin. More info: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_registration_checks_restrict_email_addresses( $value ) { |
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 default country | |
* List of all country ISO codes: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes | |
* | |
* 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 | |
/** | |
* This recipe creates a customized easy signup and code redeem page | |
* for AppSumo promotions. | |
* | |
* This recipe assumes the following: | |
* PMPro Signup Shortcode is installed and active. | |
* @link https://www.paidmembershipspro.com/add-ons/pmpro-signup-shortcode/ | |
* | |
* You have a page with [pmpro_signup] shortcode and it is configured correctly. |