/** * Get the number of required uploads * * @return int */ public function getRequiredCount() { return $this->_fileUploadValidator->getRequiredCount($count); }
/** * Gets whether the element is required * * @return boolean */ public function getRequired() { return $this->_fileUploadValidator->getRequired(); }
esc_html_e('Translate error messages', 'iphorm'); ?> </h3> <table class="ifb-form-table translate-error-messages-table"> <?php if (!isset($element['messages'])) { $element['messages'] = array(); } // key => tooltip $customisableMessages = array('not_uploaded_with_filename' => '<div class="ifb-tooltip-title">' . esc_html__('Placeholders', 'iphorm') . '</div><code>%s = ' . esc_html__('the filename', 'iphorm') . '</code>', 'not_uploaded' => '', 'too_big_with_filename' => '<div class="ifb-tooltip-title">' . esc_html__('Placeholders', 'iphorm') . '</div><code>%s = ' . esc_html__('the filename', 'iphorm') . '</code>', 'too_big' => '', 'not_allowed_type_with_filename' => '<div class="ifb-tooltip-title">' . esc_html__('Placeholders', 'iphorm') . '</div><code>%s = ' . esc_html__('the filename', 'iphorm') . '</code>', 'not_allowed_type' => '', 'field_required' => '', 'one_required' => '', 'only_partial_with_filename' => '<div class="ifb-tooltip-title">' . esc_html__('Placeholders', 'iphorm') . '</div><code>%s = ' . esc_html__('the filename', 'iphorm') . '</code>', 'only_partial' => '', 'no_file' => '', 'missing_temp_folder' => '', 'failed_to_write' => '', 'stopped_by_extension' => '', 'unknown_error' => ''); foreach ($customisableMessages as $key => $tooltip) { if (!isset($element['messages'][$key])) { $element['messages'][$key] = ''; } } $fileUploadValidator = new iPhorm_Validator_FileUpload('name'); ?> <tr valign="top"> <th><?php esc_html_e('Default', 'iphorm'); ?> </th> <th><?php esc_html_e('Translation', 'iphorm'); ?> </th> </tr> <?php foreach ($customisableMessages as $key => $tooltip) { ?> <tr valign="top">