Problem: I would like to use different text in the CRED form image upload error alert. I would like to add the maximum upload size to my own custom text.
Solution:
Add the following code to functions.php:
add_filter( 'gettext', 'better_ajax_upload_filesize_error', 20, 3); function better_ajax_upload_filesize_error( $translated_text, $text, $domain ) { if( $text == 'The file you uploaded it too large. You can upload files up to ' && $domain =='wp-cred' ){ $translated_text = "The file you attempted to upload is too large. You can upload files up to "; } return $translated_text; }
Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 6 replies, has 2 voices.
Last updated by 7 years ago.
Assisted by: Christian Cox.
The forum ‘Types Community Support’ is closed to new topics and replies.