Adding support for PolyLang on Restrict Content Pro
-
Hi,
A client of mine aasked me to add support for Polylang to Restrict Content Pro.If I read the docs right, I just have to register the backend and front end strings that are not available in the .po or stored as user options, translate the strings in the Translated Strings ist in PolyLang, and then uses the available filters to replace RCP’s settings label and text boxes with calls to pll__(), pll_e(), and pll_translate_string() ?
For example, if I have a text area setting in RCP that I want to translate, I have to register a textarea string for the user-submitted option, and filter the output of the setting in the admin like so :
add_filter ( ‘rcp_dummy_setting_output’, ‘translate’ );
function translate($dummy_setting_string) {
return pll__($dummy_setting_string);
}
Is that right ?
- The topic ‘Adding support for PolyLang on Restrict Content Pro’ is closed to new replies.