Created
July 2, 2020 13:58
-
-
Save ipokkel/b25eae831b4d012b4103c19ed517212b to your computer and use it in GitHub Desktop.
This recipe can be used to remove the profile action links on the account page. #pmpro
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 can be used to remove the profile action links on the account page. | |
* | |
* 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_pmpro_account_profile_action_links_removal( $pmpro_profile_action_links ) { | |
unset( $pmpro_profile_action_links['edit-profile'] ); // Remove change password | |
/* Uncomment the relative line by removing the comment ("//" double forward slash before the variable) if you would like to remove the links for password reset or logout. */ | |
// unset( $pmpro_profile_action_links['change-password'] ); // Remove change password | |
// unset( $pmpro_profile_action_links['logout'] ); // Remove logout link | |
return $pmpro_profile_action_links; | |
} | |
add_filter( 'pmpro_account_profile_action_links', 'my_pmpro_account_profile_action_links_removal', 15, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This recipe is included in the blog post on "Edit the Profile Action Links on the Membership Account Page" at Paid Memberships Pro here: https://www.paidmembershipspro.com/edit-profile-action-links-account-page/