New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create caldera_forms_print_translation_strings_in_footer filter #3087
Conversation
…nto feature/3078-2
Built ZIP file: 1.8.3-alpha.1.zip |
New theory, this approach is too complex. The problem we are trying to solve is Parsely defaults to these strings https://github.com/CalderaWP/Caldera-Forms/blob/master/assets/js/i18n/en.js for validation errors, sometimes it switches out to other languages, so Weglot translates other languages. That makes no sense. Proposal: If this filter is true, we pass those English strings to wp_localize_script -- Weglot's proposed solution. Else, it works the same way it always did. AND we can put a filter on those strings, which is a requested feature, I'll have to find the issue. |
With
|
1.8.3-alpha.1.zip New build including the last commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed a typo and the interpretation of variable as a string.
@Shelob9 Is CF_VALIDATOR_STRINGS printed by default ? Meaning that the filter is used to remove it using add_filter( 'caldera_forms_print_translation_strings_in_footer', '__return_false' );
I'm not make sure if we need to edit the coment l851 or if we change the default to false l854
@New0 your correction is correct. I want to make sure these strings are used by Parsely. |
By default this does nothing. If the filter is set to return true, then the Parsely validtor strings will be printed in the footer.
add_filter( 'caldera_forms_print_translation_strings_in_footer', '__return_true' );
#2962