Forked from dparker1005/pmpro_polylang_translate_notloggedintext.php
Created
August 31, 2021 13:49
-
-
Save MaryOJob/6bc250b0d3f4f1d0e9308d674a421880 to your computer and use it in GitHub Desktop.
Translates the PMPro Not Logged In text while using Polylang.
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 | |
// 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