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 | |
/** | |
* Password visibility toggle with Dashicons. | |
* | |
* Adds an eye icon which on click reveals the password. | |
* This also works for the Signup Shortcode Add On. | |
* | |
* This code recipe assumes that the Dashicons library is already enqueued. | |
* | |
* You can add this recipe to your site by creating 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 | |
/** | |
* This allows user's to have multiple levels when purchasing via WooCommerce. | |
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
add_filter( 'pmprowoo_mmpu_force_add_level', '__return_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 | |
/** | |
* This recipe sets the required password strength or length for PMPro Strong Passwords * | |
* depending on the PHP version and the settings below. | |
* | |
* You should set your password strength or length in the SETTINGS section below | |
* inside the my_pmprosp_password_strength function. | |
* | |
* 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 | |
/** | |
* This recipe extends the user login period if remember me was checked. | |
* | |
* @link https://developer.wordpress.org/reference/hooks/auth_cookie_expiration/ | |
* | |
* 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 | |
// Copy from below here... | |
/* | |
* Redirect logout to PMPro login page. | |
*/ | |
function my_logout_url_redirect_pmpro( $logout_url ) { | |
global $pmpro_pages; | |
if ( ! empty( $pmpro_pages['login'] ) ) { |