Skip to content

Instantly share code, notes, and snippets.

@femiyb
Last active March 25, 2021 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save femiyb/fe0b27db3b83225c9ae378aa468da97a to your computer and use it in GitHub Desktop.
Save femiyb/fe0b27db3b83225c9ae378aa468da97a to your computer and use it in GitHub Desktop.
<?php
/*
Replace or translate text strings that's not translatable with gettext.
*/
// Check page content and replace text strings
function change_text_str_replace( $text ) {
global $pmpro_pages;
if ( is_page( $pmpro_pages['account'] ) ) {
$text = str_replace( 'Change', 'Add', $text );
}
return $text;
}
add_filter( 'the_content', 'change_text_str_replace', 25 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment