Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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