function meta_box_export() { $options = array(); if (!empty($_GET['export_error'])) { $errors = explode(',', $_GET['export_error']); if (in_array('name', $errors)) { ITUtility::show_inline_error_message('You must supply a name for the export.'); } } foreach ((array) $this->_data_sources as $var => $name) { $options['data_sources'][] = $var; } $form = new ITForm($options); ?> <?php $form->start_form(array(), 'export_data'); ?> <p><?php _e('A Builder export file can be used to easily migrate settings, layouts, and views to another site. For example, transferring settings from a development site to a production site. Export files can also be used as very basic backups of Builder settings.', 'it-l10n-Builder-Cohen'); ?> </p> <hr /> <p><?php _e('Create a name for this export:', 'it-l10n-Builder-Cohen'); ?> </p> <ul class="no-bullets"> <li><label for="name"><?php $form->add_text_box('name'); ?> </label></li> </ul> <p><?php _e('Select what the export file should contain:', 'it-l10n-Builder-Cohen'); ?> </p> <ul class="no-bullets"> <?php foreach ((array) $this->_data_sources as $var => $name) { ?> <li><label for="data_sources-<?php echo $var; ?> "><?php $form->add_multi_check_box('data_sources', $var); ?> <?php echo $name; ?> </li> <?php } ?> </ul> <p> <?php $form->add_submit('export', array('value' => 'Create Export', 'class' => 'button-secondary')); ?> </p> <?php $form->add_hidden_no_save('action', 'export'); ?> <?php $form->add_hidden_no_save('editor_tab', $this->_parent->_active_tab); ?> <?php $form->end_form(); }