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 | |
/** | |
* Example PMPro HTML User Field. | |
* | |
* 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/ | |
*/ | |
function example_html_pmpro_user_field() { |
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 | |
/** | |
* Extend the expiration date from a set date for the Set Expiration Date Add On. | |
* | |
* 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/ | |
*/ | |
function my_pmprosed_extend_expiration_date_from_set_date( $set_date ) { |
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
/* Custom styling for the highlight level of the level comparison table */ | |
/* Apply borders to the highlighted column */ | |
.pmpro_advanced_levels-compare_table th.pmpro_level-highlight, | |
.pmpro_advanced_levels-compare_table td.pmpro_level-highlight { | |
border-left: 6px solid #00d084; | |
border-right: 6px solid #00d084; | |
} | |
/* Add border to the top of the highlighted column */ |
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
/* Highlight the middle column of the level comparison table | |
Adjust the CSS selectors to match your preferred column to highlight. */ | |
/* Add a border */ | |
.pmpro_advanced_levels-compare_table thead th:nth-child(3), | |
.pmpro_advanced_levels-compare_table tbody td:nth-child(3), | |
.pmpro_advanced_levels-compare_table tfoot td:nth-child(3) { | |
border-left: 6px solid #00d084; | |
border-right: 6px solid #00d084; | |
} |
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 | |
/** | |
* Customize the no access message for members with pending approvals. | |
* | |
* This will only work if PMPro Approvals is active and PMPro version is 3.1 or greater. | |
* | |
* 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 | |
/** | |
* Set the minimum password score for the PMPro Require Strong Passwords Add On. | |
* | |
* 1 is somewhat guessable (guesses < 10^8), provides some protection from unthrottled online attacks | |
* 2 is safely unguessable (guesses < 10^10), offers moderate protection from offline slow-hash scenario | |
* 3 is very unguessable (guesses >= 10^10) and provides strong protection from offline slow-hash scenario | |
* | |
* 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. |
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 | |
/** | |
* Prorate the level cost text displayed for level 2. | |
* Set your proration on line 24 | |
* | |
* 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 | |
/** | |
* Make PMPro Shipping Address fields optional. | |
* | |
* Fields: 'pmpro_sfirstname', 'pmpro_slastname', 'pmpro_saddress1', 'pmpro_scity', 'pmpro_sstate', 'pmpro_scountry', 'pmpro_szipcode', 'pmpro_sphone' | |
* | |
* 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 | |
/** | |
* Block active members from checking out but allow renewal if membership is expiring soon. | |
* | |
* 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/ | |
*/ |
NewerOlder