function _show_layouts_and_views_options() { $options = array('child_theme_type' => 'parent', 'theme_layouts' => 'ignore', 'theme_activation' => !empty($_REQUEST['theme_activation']) ? 1 : '', 'fresh_install' => !empty($_REQUEST['fresh_install']) ? 1 : '', 'step' => 'finish'); $logo_url = ITUtility::get_url_from_file(dirname(__FILE__) . '/images/builder-logo.png'); $old_theme = isset($GLOBALS['builder_old_theme']) ? $GLOBALS['builder_old_theme'] : false; $current_theme = wp_get_theme(); if ($old_theme && $old_theme->get_template() != $current_theme->get_template()) { $template_switch = true; } else { $template_switch = false; } $form = new ITForm($options); $this->_form =& $form; ?> <div class="wrap"> <?php $form->start_form(array('id' => 'it-builder-setup')); ?> <?php if (empty($_REQUEST['theme_activation'])) { ?> <?php ITUtility::screen_icon(); ?> <?php $this->_print_editor_tabs(); ?> <?php } ?> <div class="it-brochure-box"> <img class="it-logo" src="<?php echo $logo_url; ?> " alt="Builder Logo" /> <h1>Builder Setup</h1> <?php if ($template_switch) { ?> <p><?php _e('You are switching from a different Builder theme. Would you like to continue to use your current Layouts and Views? Or do you want to use the Layouts and Views included with this new theme?', 'it-l10n-Builder-Paige'); ?> </p> <div class="it-shrink-wrap-box"> <label><?php printf(__('%1$s Keep the site\'s current Layouts and Views', 'it-l10n-Builder-Paige'), $form->add_radio('theme_layouts', array('value' => 'ignore', 'class' => 'show-hide-toggle'))); ?> </label> <br /> <label><?php printf(__('%1$s Use the Layouts and Views included with the new theme', 'it-l10n-Builder-Paige'), $form->add_radio('theme_layouts', array('value' => 'use', 'class' => 'show-hide-toggle'))); ?> </label> <div class="it-options-theme_layouts it-options-theme_layouts-use"> <p class="description"><?php _e('Important: This option will replace your current Layouts and Views with the Layouts and Views provided by the theme.', 'it-l10n-Builder-Paige'); ?> </p> </div> <!-- <div class="it-indent-box it-options-theme_layouts it-options-theme_layouts-use"> <label><?php printf(__('%1$s Keep current Layouts', 'it-l10n-Builder-Paige'), $form->add_radio('layouts_import_method', 'add')); ?> </label> <br /> <label><?php printf(__('%1$s Remove current Layouts', 'it-l10n-Builder-Paige'), $form->add_radio('layouts_import_method', 'replace')); ?> </label> </div>--> </div> <?php } else { ?> <p><?php _e('Your theme provides a set of default Layouts and Views. You can update your site to match these provided Layouts and Views.', 'it-l10n-Builder-Paige'); ?> </p> <div class="it-shrink-wrap-box"> <label><?php printf(__('%1$s Keep the site\'s current Layouts and Views', 'it-l10n-Builder-Paige'), $form->add_radio('theme_layouts', array('value' => 'ignore', 'class' => 'show-hide-toggle'))); ?> </label> <br /> <label><?php printf(__('%1$s Use the Layouts and Views included with the theme', 'it-l10n-Builder-Paige'), $form->add_radio('theme_layouts', array('value' => 'use', 'class' => 'show-hide-toggle'))); ?> </label> <div class="it-options-theme_layouts it-options-theme_layouts-use"> <p class="description"><?php _e('Important: This option will replace your current Layouts and Views with the Layouts and Views provided by the theme.', 'it-l10n-Builder-Paige'); ?> </p> </div> <!-- <div class="it-indent-box it-options-theme_layouts it-options-theme_layouts-use"> <label><?php printf(__('%1$s Keep current Layouts', 'it-l10n-Builder-Paige'), $form->add_radio('layouts_import_method', 'add')); ?> </label> <br /> <label><?php printf(__('%1$s Remove current Layouts', 'it-l10n-Builder-Paige'), $form->add_radio('layouts_import_method', 'replace')); ?> </label> </div>--> </div> <?php } ?> <div class="it-input-set"> <div class="it-options-theme_layouts it-options-theme_layouts-ignore"> <?php $form->add_submit('update_layouts_and_views', array('value' => 'Keep current Layouts and Views')); ?> </div> <div class="it-options-theme_layouts it-options-theme_layouts-use"> <?php $form->add_submit('update_layouts_and_views', array('value' => 'Update Layouts and Views')); ?> </div> <p><a class="it-skip" href="<?php echo admin_url('admin.php?page=ithemes-builder-theme'); ?> "><?php _e('Skip'); ?> </a></p> </div> </div> <?php $form->add_hidden('theme_activation'); ?> <?php $form->add_hidden('fresh_install'); ?> <?php $form->add_hidden('step'); ?> <?php $form->add_hidden_no_save('editor_tab', $this->_parent->_active_tab); ?> <?php $form->end_form(); ?> </div> <?php }
function meta_box_import() { $form = new ITForm(); ?> <?php $form->start_form(array(), 'import_data'); ?> <p><?php _e('Importing a Builder export file allows you to apply/add some or all of the export data to the site. Importing the data also also adds the uploaded export file to the list of Site Exports for use later.', 'it-l10n-Builder-Cohen'); ?> </p> <hr /> <p><?php printf(__('Select export file to import:', 'it-l10n-Builder-Cohen')); ?> </p> <ul class="no-bullets"> <li><?php $form->add_file_upload('import_file'); ?> </li> </ul> <br /> <p> <?php $form->add_submit('import', array('value' => 'Import', 'class' => 'button-secondary')); ?> </p> <?php $form->add_hidden_no_save('action', 'import'); ?> <?php $form->add_hidden_no_save('editor_tab', $this->_parent->_active_tab); ?> <?php $form->end_form(); }