Closed louiswalch closed 6 years ago
Thanks for the suggestion. I will look at making this change as soon as I have time.
Cool. In the meantime, for anyone wanting to remove them I did it with a little hacky CSS.
// ---------------------------------------------------------------------------
// ACF : Medium Field : Change the message displayed below editor, and then make it look better.
add_filter('gettext', function( $translated_text, $untranslated_text, $domain ) {
if ($translated_text == 'select text for formatting options') {
$translated_text = '<span>Highlight text to format — For single line break, use SHIFT+RETURN.</span>';
}
return $translated_text;
}, 20, 3);
// ---------------------------------------------------------------------------
// ACF : Medium Field : Remove the parentheses from message.
add_action('admin_head', function() {
echo '<style>'
.'.acf-field-medium-editor .acf-input > SPAN { color: white; } '
.'.acf-field-medium-editor .acf-input > SPAN SPAN { font-style: normal; font-size: 10px; color: #666; position: relative; left: -4px; }'
.'</style>';
});
For the version here I have added the () into the string to be translated. I have also added a filter so that you can alter this text to whatever you want. Here's the line from my code
$e .= '<span>'.apply_filters('acf-medium-editor/field-instructions', __('(select text for formatting options)', 'acf-medium-editor')).'</span>';
I have not updated this to wordpress.org yet. I'm going to wait a couple of days and see if the person that did the one translation sends me and update first.
It would be nice if the ()'s were either part of the language string, or the entire thing was wrapped with a filter. I'd like to have full control over what is included below the editor.