Created
June 13, 2019 12:59
-
-
Save dparker1005/20e8a0b6933cb0763798c51a5e9d9d75 to your computer and use it in GitHub Desktop.
Updated snippet from user which changes 'Account Management' to 'Password Management' on a user's WordPress profile in addition to the snippet's original functionality.
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 | |
function my_gettext_membership( $output_text, $input_text, $domain ) { | |
global $pagenow; | |
if ( ! is_admin() && 'pmproarc' === $domain ) { | |
$output_text = preg_replace( '/Yes, renew at.+$/', 'Allow recurring payments using PayPal', $output_text ); | |
} | |
if ( 'profile.php' === $pagenow ) { | |
$output_text = str_replace( 'Account Management', 'Password Management', $output_text ); | |
} | |
return $output_text; | |
} | |
add_filter( 'gettext', 'my_gettext_membership', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment