Skip to content

Instantly share code, notes, and snippets.

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 MaryOJob/6bc250b0d3f4f1d0e9308d674a421880 to your computer and use it in GitHub Desktop.
Save MaryOJob/6bc250b0d3f4f1d0e9308d674a421880 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