get_option('_file_attachment'); $file_attach = false; if (isset($file_attachment[0]) && $file_attachment[0] == 'yes') { $file_attach = true; } // Labels $button_label = $wooconvo->get_option('_button_text'); $button_label = $button_label != '' ? $button_label : 'Send'; $placehoder_label = $wooconvo->get_option('_message_placeholder'); $placehoder_label = $placehoder_label != '' ? $placehoder_label : 'Type Message'; $textarea_class = 'wooconvo-textarea'; if( !$file_attach ) { $textarea_class .= ' wooconvo-nofile'; } ?>
get_option('_upload_text'); $upload_label = $upload_label != '' ? $upload_label : 'Select file'; $label_select = sprintf(__('%s', 'wooconvo'), $upload_label); $files_allowed = ($this->get_option('_files_allowed') ? 5 : $this->get_option('_files_allowed')); $file_types = ($this->get_option('_types_allowed') == '' ? 'jpg,png,gif' : $this->get_option('_types_allowed')); $file_size = ($this->get_option('_size_limit') == '' ? '5mb' : $this->get_option('_size_limit')); $chunk_size = '1mb'; $args = array( 'name' => $name, 'id' => $name, 'data-type' => 'file', 'button-label-select' => $label_select, 'button-label-upload' => $label_select, 'files-allowed' => $files_allowed, 'file-types' => $file_types, 'file-size' => $file_size, 'chunk-size' => $chunk_size ); echo '
'; $wooconvo -> inputs['file'] -> render_input($args); echo '
'; ?>