Hi, I’d like to change the wording the user sees on the User Account section, as shown on the screenshot – the menu item “Restricted Pages” and the section title “Restricted Pages List”. Is this possible?
Sorry for the late response, I was sick. Regarding your question, you can but not directly with my plugin. You could use a translation plugin, maybe try this:
add_filter( 'gettext', 'wpdocs_translate_text', 10, 3 );
function wpdocs_translate_text( $translated_text, $untranslated_text, $domain ) {
if ( 'blah' !== $translated_text ) {
$translated_text = 'lorem';
return $translated_text;
}
// Now do your checking for your string within the 'blah' domain
}
Add that to your theme. Its not ideal but at least it should work.
I also need this feature, being able to change the title “Restricted Pages” to something like “Product Support Pages”, etc that are much more customer friendly. Would love to see it added to the plugin settings.
Of course, we always try to avoid editing PHP or stylesheets due to the likelihood of changes being erased every time we fully update a plugin or theme.
Thanks for this code snippet. I must have done something wrong though! I tried to change “Restricted Pages” to “Purchased Content” but ended up with the below!
add_filter( 'gettext', 'wpdocs_translate_text', 10, 3 );
function wpdocs_translate_text( $translated_text, $untranslated_text, $domain ) {
if ( 'Restricted Pages' !== $translated_text ) {
$translated_text = 'Purchased Content';
return $translated_text;
}
// Now do your checking for your string within the 'blah' domain
}
Of course, we always try to avoid editing PHP or stylesheets due to the likelihood of changes being erased every time we fully update a plugin or theme.
You can use a child theme. Then you can update the theme without overwriting anything.