Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dparker1005/726c52318f21d795791d1eabb86c4864 to your computer and use it in GitHub Desktop.
Save dparker1005/726c52318f21d795791d1eabb86c4864 to your computer and use it in GitHub Desktop.
Translates the PMPro Not Logged In text while using Polylang.
<?php
// Copy from below here...
/*
* Translates the PMPro Not Logged In text while using Polylang.
* Currently set up to use US English and Spain Spanish.
*/
function my_pmpro_polylang_translate_notloggedintext( $value, $options ) {
switch ( get_locale() ) {
case 'en_US':
$value = 'Not logged in.';
break;
case 'es_ES':
$value = 'Sin iniciar sesión.';
break;
}
return $value;
}
add_filter( 'option_pmpro_notloggedintext', 'my_pmpro_polylang_translate_notloggedintext', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment