Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save faisalahammad/edf965a3c03d62572695f25622376c11 to your computer and use it in GitHub Desktop.
Save faisalahammad/edf965a3c03d62572695f25622376c11 to your computer and use it in GitHub Desktop.
Custom Ninja Forms PHP snippet to set maximum file upload limit message – Easily restrict file uploads with customized user notification in Ninja Forms plugin for WordPress.
<?php
// Customize the "Max x files are allowed" message in Ninja Forms File Uploads
add_filter( 'ninja_forms_uploads_js_strings', 'custom_ninja_forms_uploads_js_strings' );
function custom_ninja_forms_uploads_js_strings( $strings ) {
// Change default message to German: "Max %n Dateien sind erlaubt"
$strings['file_limit'] = __( 'Max %n Dateien sind erlaubt', 'ninja-forms-uploads' );
return $strings;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment