first commit
This commit is contained in:
@@ -0,0 +1,542 @@
|
||||
<?php $custom_type = get_post_type_object( $post_type ); ?>
|
||||
<div class="wpallimport-collapsed closed wpallimport-section wpallimport-custom-fields">
|
||||
<div class="wpallimport-content-section">
|
||||
<div class="wpallimport-collapsed-header">
|
||||
<h3><?php _e('Custom Fields','wp_all_import_plugin');?></h3>
|
||||
</div>
|
||||
<div class="wpallimport-collapsed-content" style="padding: 0;">
|
||||
<div class="wpallimport-collapsed-content-inner">
|
||||
<div class="wpallimport-free-edition-notice" style="text-align:center; margin-top:0; margin-bottom: 40px;">
|
||||
<a href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=2707176&edd_options%5Bprice_id%5D=1&utm_source=import-plugin-free&utm_medium=upgrade-notice&utm_campaign=custom-fields" target="_blank" class="upgrade_link"><?php _e('Upgrade to the Pro edition of WP All Import to Import Custom Fields', 'pmxi_plugin');?></a>
|
||||
<p><?php _e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_import_plugin'); ?></p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
__META_KEYS = <?php echo json_encode($meta_keys) ?>;
|
||||
</script>
|
||||
<?php if (empty($post['custom_name'])): ?>
|
||||
<div class="input cf_welcome">
|
||||
<?php if ( ! empty($meta_keys) ):?>
|
||||
<h1 style="font-size:23px; color:#40acad;"><?php printf(__('Your website is using Custom Fields to store data for %s.', 'wp_all_import_plugin'), esc_attr($custom_type->labels->name)); ?></h1>
|
||||
<a class="autodetect_cf auto_detect_cf" href="javascript:void(0);" rel="auto_detect_cf"><?php _e('See Detected Fields', 'wp_all_import_plugin'); ?></a>
|
||||
<?php else: ?>
|
||||
<h1 style="font-size:23px; color:#40acad;"><?php printf(__('No Custom Fields are present in your database for %s.', 'wp_all_import_plugin'), esc_attr($custom_type->labels->name)); ?></h1>
|
||||
<p class="wpallimport-note"><?php printf(__('Manually create a %s, and fill out each field you want to import data to. WP All Import will then display these fields as available for import below.', 'wp_all_import_plugin'), esc_attr($custom_type->labels->singular_name)); ?></p>
|
||||
<?php endif;?>
|
||||
<a href="javascript:void(0);" class="wpallimport-dismiss-cf-welcome"><?php _e('Hide Notice', 'wp_all_import_plugin'); ?></a>
|
||||
</div>
|
||||
<div class="input cf_detect_result" style="display:none;">
|
||||
<h1 style="font-size:23px; color:#40acad;">
|
||||
<span class="cf_detected"></span>
|
||||
<a class="autodetect_cf clear_detected_cf" href="javascript:void(0);" rel="clear_detected_cf"><?php _e('Clear All Fields', 'wp_all_import_plugin'); ?></a>
|
||||
</h1>
|
||||
<p class="wpallimport-note"><?php printf(__('If not all fields were detected, manually create a %s, and fill out each field you want to import data to. Then create a new import, and WP All Import will display these fields as available for import below.', 'wp_all_import_plugin'), esc_attr($custom_type->labels->singular_name)); ?></p>
|
||||
<a href="javascript:void(0);" class="wpallimport-dismiss-cf-welcome"><?php _e('Hide Notice', 'wp_all_import_plugin'); ?></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<table class="form-table wpallimport-custom-fields-list" style="max-width:none;">
|
||||
<tr>
|
||||
<td colspan="3" style="padding-top:20px;">
|
||||
|
||||
<table class="form-table custom-params" style="max-width:none; border:none;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="padding-bottom:10px;"><?php _e('Name', 'wp_all_import_plugin') ?></td>
|
||||
<td style="padding-bottom:10px;"><?php _e('Value', 'wp_all_import_plugin') ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (!empty($post['custom_name'])):?>
|
||||
<?php foreach ($post['custom_name'] as $i => $name): ?>
|
||||
<?php $custom_mapping_rules = (!empty($post['custom_mapping_rules'][$i])) ? json_decode($post['custom_mapping_rules'][$i], true) : false; ?>
|
||||
<tr class="form-field">
|
||||
<td style="width: 45%;">
|
||||
<input type="text" name="custom_name[]" value="<?php echo esc_attr($name) ?>" class="widefat wp_all_import_autocomplete" style="margin-bottom:10px;"/>
|
||||
<input type="hidden" name="custom_format[]" value="<?php echo ( ! empty($post['custom_format'][$i]) ) ? '1' : '0'; ?>"/>
|
||||
</td>
|
||||
<td class="action">
|
||||
<div class="custom_type" rel="default">
|
||||
<textarea name="custom_value[]" class="widefat" <?php echo ( ! empty($post['custom_format'][$i]) ) ? 'style="display:none;"' : ''; ?>><?php echo esc_textarea($post['custom_value'][$i]) ?></textarea>
|
||||
<a class="specify_cf pmxi_cf_pointer" rel="serialized_<?php echo esc_attr($i); ?>" href="javascript:void(0);" <?php echo ( empty($post['custom_format'][$i]) ) ? 'style="display:none;"' : ''; ?>><?php _e('Click to specify', 'wp_all_import_plugin'); ?></a>
|
||||
<div class="input wpallimport-custom-fields-actions">
|
||||
<a href="javascript:void(0);" class="wpallimport-cf-options"><?php _e('Field Options...', 'wp_all_import_plugin'); ?></a>
|
||||
<ul id="wpallimport-cf-menu-<?php echo esc_attr($i);?>" class="wpallimport-cf-menu">
|
||||
<li class="<?php echo ( ! empty($post['custom_format'][$i]) ) ? 'active' : ''; ?>">
|
||||
<a href="javascript:void(0);" class="set_serialize"><?php _e('Serialized', 'wp_all_import_plugin'); ?></a>
|
||||
</li>
|
||||
<li class="<?php echo ( ! empty($custom_mapping_rules) ) ? 'active' : ''; ?>">
|
||||
<a href="javascript:void(0);" class="set_mapping pmxi_cf_mapping" rel="cf_mapping_<?php echo esc_attr($i); ?>"><?php _e('Mapping', 'wp_all_import_plugin'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="serialized_<?php echo esc_attr($i); ?>" class="custom_type" rel="serialized" style="display:none;">
|
||||
<fieldset>
|
||||
<table cellpadding="0" cellspacing="5" class="cf-form-table" rel="serialized_<?php echo esc_attr($i); ?>">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?php _e('Key', 'wp_all_import_plugin') ?></td>
|
||||
<td><?php _e('Value', 'wp_all_import_plugin') ?></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
$serialized_values = (!empty($post['serialized_values'][$i])) ? json_decode($post['serialized_values'][$i], true) : false;
|
||||
|
||||
$filtered_serialized_values = array();
|
||||
|
||||
if ( ! empty($serialized_values) and is_array($serialized_values))
|
||||
|
||||
$filtered_serialized_values = array_filter($serialized_values);
|
||||
|
||||
if ( ! empty($filtered_serialized_values)){
|
||||
|
||||
foreach ( $filtered_serialized_values as $key => $value) {
|
||||
|
||||
$k = $key;
|
||||
|
||||
if (is_array($value)){
|
||||
$keys = array_keys($value);
|
||||
$k = $keys[0];
|
||||
}
|
||||
|
||||
?>
|
||||
<tr class="form-field">
|
||||
<td>
|
||||
<input type="text" class="serialized_key widefat" value="<?php echo esc_attr($k); ?>">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="serialized_value widefat" value="<?php echo esc_html((is_array($value)) ? $value[$k] : $value); ?>">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else{
|
||||
?>
|
||||
<tr class="form-field">
|
||||
<td>
|
||||
<input type="text" class="serialized_key widefat">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="serialized_value widefat">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr class="form-field template">
|
||||
<td>
|
||||
<input type="text" class="serialized_key widefat">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="serialized_value widefat">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<a href="javascript:void(0);" title="<?php _e('Add Custom Field', 'wp_all_import_plugin')?>" class="action add-new-key add-new-entry"><?php _e('Add Another', 'wp_all_import_plugin') ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="wrap" style="position:relative;">
|
||||
<a class="save_popup auto_detect_sf" href="javascript:void(0);"><?php _e('Auto-Detect', 'wp_all_import_plugin'); ?></a>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div class="wrap" style="position:relative;">
|
||||
<a class="save_popup save_sf" href="javascript:void(0);"><?php _e('Save', 'wp_all_import_plugin'); ?></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="serialized_values[]" value="<?php if (!empty($post['serialized_values'][$i])) echo esc_html($post['serialized_values'][$i]); ?>"/>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="cf_mapping_<?php echo esc_attr($i); ?>" class="custom_type" rel="mapping" style="display:none;">
|
||||
<fieldset>
|
||||
<table cellpadding="0" cellspacing="5" class="cf-form-table" rel="cf_mapping_<?php echo esc_attr($i); ?>">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?php _e('In Your File', 'wp_all_import_plugin') ?></td>
|
||||
<td><?php _e('Translated To', 'wp_all_import_plugin') ?></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
if ( ! empty($custom_mapping_rules) and is_array($custom_mapping_rules)){
|
||||
|
||||
foreach ($custom_mapping_rules as $key => $value) {
|
||||
|
||||
$k = $key;
|
||||
|
||||
if (is_array($value)){
|
||||
$keys = array_keys($value);
|
||||
$k = $keys[0];
|
||||
}
|
||||
|
||||
?>
|
||||
<tr class="form-field">
|
||||
<td>
|
||||
<input type="text" class="mapping_from widefat" value="<?php echo esc_attr($k); ?>">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="mapping_to widefat" value="<?php echo esc_attr((is_array($value)) ? $value[$k] : $value); ?>">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
else{
|
||||
?>
|
||||
<tr class="form-field">
|
||||
<td>
|
||||
<input type="text" class="mapping_from widefat">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="mapping_to widefat">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr class="form-field template">
|
||||
<td>
|
||||
<input type="text" class="mapping_from widefat">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="mapping_to widefat">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<a href="javascript:void(0);" title="<?php _e('Add Another', 'wp_all_import_plugin')?>" class="action add-new-key add-new-entry"><?php _e('Add Another', 'wp_all_import_plugin') ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="wrap" style="position:relative;">
|
||||
<a class="save_popup save_mr" href="javascript:void(0);"><?php _e('Save Rules', 'wp_all_import_plugin'); ?></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="custom_mapping_rules[]" value="<?php if (!empty($custom_mapping_rules)) echo esc_html($post['custom_mapping_rules'][$i]); ?>"/>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<span class="action remove">
|
||||
<a href="#remove" style="top: 8px; right: 0;"></a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach ?>
|
||||
<?php else: ?>
|
||||
<tr class="form-field">
|
||||
<td style="width: 45%;">
|
||||
<input type="text" name="custom_name[]" value="" class="widefat wp_all_import_autocomplete" style="margin-bottom:10px;"/>
|
||||
<input type="hidden" name="custom_format[]" value="0"/>
|
||||
</td>
|
||||
<td class="action">
|
||||
<div class="custom_type" rel="default">
|
||||
<textarea name="custom_value[]" class="widefat"></textarea>
|
||||
<a class="specify_cf pmxi_cf_pointer" rel="serialized_0" href="javascript:void(0);" style="display:none;"><?php _e('Click to specify', 'wp_all_import_plugin'); ?></a>
|
||||
<div class="input wpallimport-custom-fields-actions">
|
||||
<a href="javascript:void(0);" class="wpallimport-cf-options"><?php _e('Field Options...', 'wp_all_import_plugin'); ?></a>
|
||||
<ul id="wpallimport-cf-menu-0" class="wpallimport-cf-menu">
|
||||
<li>
|
||||
<a href="javascript:void(0);" class="set_serialize"><?php _e('Serialized', 'wp_all_import_plugin'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" class="set_mapping pmxi_cf_mapping" rel="cf_mapping_0"><?php _e('Mapping', 'wp_all_import_plugin'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="serialized_0" class="custom_type" rel="serialized" style="display:none;">
|
||||
<fieldset>
|
||||
<table cellpadding="0" cellspacing="5" class="cf-form-table" rel="serialized_0">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?php _e('Key', 'wp_all_import_plugin') ?></td>
|
||||
<td><?php _e('Value', 'wp_all_import_plugin') ?></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="form-field">
|
||||
<td>
|
||||
<input type="text" class="serialized_key widefat" value="">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="serialized_value widefat" value="">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="form-field template">
|
||||
<td>
|
||||
<input type="text" class="serialized_key widefat" value="">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="serialized_value widefat"value="">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<a href="javascript:void(0);" title="<?php _e('Add Another', 'wp_all_import_plugin')?>" class="action add-new-key add-new-entry"><?php _e('Add Another', 'wp_all_import_plugin') ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="wrap" style="position:relative;">
|
||||
<a class="save_popup auto_detect_sf" href="javascript:void(0);"><?php _e('Auto-Detect', 'wp_all_import_plugin'); ?></a>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div class="wrap" style="position:relative;">
|
||||
<a class="save_popup save_sf" href="javascript:void(0);"><?php _e('Save', 'wp_all_import_plugin'); ?></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="serialized_values[]" value=""/>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="cf_mapping_0" class="custom_type" rel="mapping" style="display:none;">
|
||||
<fieldset>
|
||||
<table cellpadding="0" cellspacing="5" class="cf-form-table" rel="cf_mapping_0">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?php _e('In Your File', 'wp_all_import_plugin') ?></td>
|
||||
<td><?php _e('Translated To', 'wp_all_import_plugin') ?></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="form-field">
|
||||
<td>
|
||||
<input type="text" class="mapping_from widefat" value="">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="mapping_to widefat" value="">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="form-field template">
|
||||
<td>
|
||||
<input type="text" class="mapping_from widefat" value="">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="mapping_to widefat"value="">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<a href="javascript:void(0);" title="<?php _e('Add Another', 'wp_all_import_plugin')?>" class="action add-new-key add-new-entry"><?php _e('Add Another', 'wp_all_import_plugin') ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="wrap" style="position:relative;">
|
||||
<a class="save_popup save_mr" href="javascript:void(0);"><?php _e('Save Rules', 'wp_all_import_plugin'); ?></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="custom_mapping_rules[]" value=""/>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<span class="action remove">
|
||||
<a href="#remove" style="top: 8px; right: 0;"></a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr class="form-field template">
|
||||
<td style="width: 45%;">
|
||||
<input type="text" name="custom_name[]" value="" class="widefat wp_all_import_autocomplete" style="margin-bottom:10px;"/>
|
||||
<input type="hidden" name="custom_format[]" value="0"/>
|
||||
</td>
|
||||
<td class="action">
|
||||
<div class="custom_type" rel="default">
|
||||
<textarea name="custom_value[]" class="widefat"></textarea>
|
||||
<a class="specify_cf pmxi_cf_pointer" href="javascript:void(0);" style="display:none;"><?php _e('Click to specify', 'wp_all_import_plugin'); ?></a>
|
||||
<div class="input wpallimport-custom-fields-actions">
|
||||
<a href="javascript:void(0);" class="wpallimport-cf-options"><?php _e('Field Options...', 'wp_all_import_plugin'); ?></a>
|
||||
<ul class="wpallimport-cf-menu">
|
||||
<li>
|
||||
<a href="javascript:void(0);" class="set_serialize"><?php _e('Serialized', 'wp_all_import_plugin'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0);" class="set_mapping pmxi_cf_mapping"><?php _e('Mapping', 'wp_all_import_plugin'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom_type" rel="serialized" style="display:none;">
|
||||
<fieldset>
|
||||
<table cellpadding="0" cellspacing="5" class="cf-form-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?php _e('Key', 'wp_all_import_plugin') ?></td>
|
||||
<td><?php _e('Value', 'wp_all_import_plugin') ?></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="form-field">
|
||||
<td>
|
||||
<input type="text" class="serialized_key widefat">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="serialized_value widefat">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="form-field template">
|
||||
<td>
|
||||
<input type="text" class="serialized_key widefat">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="serialized_value widefat">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<a href="javascript:void(0);" title="<?php _e('Add Another', 'wp_all_import_plugin'); ?>" class="action add-new-key add-new-entry"><?php _e('Add Another', 'wp_all_import_plugin') ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="wrap" style="position:relative;">
|
||||
<a class="save_popup auto_detect_sf" href="javascript:void(0);"><?php _e('Auto-Detect', 'wp_all_import_plugin'); ?></a>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div class="wrap" style="position:relative;">
|
||||
<a class="save_popup save_sf" href="javascript:void(0);"><?php _e('Save', 'wp_all_import_plugin'); ?></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="serialized_values[]" value=""/>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="custom_type" rel="mapping" style="display:none;">
|
||||
<fieldset>
|
||||
<table cellpadding="0" cellspacing="5" class="cf-form-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?php _e('In Your File', 'wp_all_import_plugin') ?></td>
|
||||
<td><?php _e('Translated To', 'wp_all_import_plugin') ?></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="form-field">
|
||||
<td>
|
||||
<input type="text" class="mapping_from widefat">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="mapping_to widefat">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="form-field template">
|
||||
<td>
|
||||
<input type="text" class="mapping_from widefat">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="mapping_to widefat">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<a href="javascript:void(0);" title="<?php _e('Add Another', 'wp_all_import_plugin')?>" class="action add-new-key add-new-entry"><?php _e('Add Another', 'wp_all_import_plugin') ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="wrap" style="position:relative;">
|
||||
<a class="save_popup save_mr" href="javascript:void(0);"><?php _e('Save Rules', 'wp_all_import_plugin'); ?></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="custom_mapping_rules[]" value=""/>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<span class="action remove">
|
||||
<a href="#remove" style="top: 8px; right: 0;"></a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><a href="javascript:void(0);" title="<?php _e('Add Custom Field', 'wp_all_import_plugin')?>" class="action add-new-custom add-new-entry"><?php _e('Add Custom Field', 'wp_all_import_plugin') ?></a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input type="hidden" id="existing_meta_keys" value="<?php echo esc_html(implode(',', $meta_keys)); ?>"/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wpallimport-overlay"></div>
|
||||
@@ -0,0 +1,208 @@
|
||||
<div class="wpallimport-collapsed closed wpallimport-section wpallimport-featured-images">
|
||||
<div class="wpallimport-content-section" style="padding-bottom: 0;">
|
||||
<div class="wpallimport-collapsed-header" style="margin-bottom: 15px;">
|
||||
<h3><?php echo esc_html($section_title);?></h3>
|
||||
</div>
|
||||
<div class="wpallimport-collapsed-content" style="padding: 0;">
|
||||
<div class="wpallimport-collapsed-content-inner">
|
||||
<?php if ($section_is_show_warning and ( $post_type != "product" or ! class_exists('PMWI_Plugin'))):?>
|
||||
|
||||
<div class="wpallimport-free-edition-notice" style="text-align:center; margin-top:-15px; margin-bottom: 40px;">
|
||||
<a href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=2707176&edd_options%5Bprice_id%5D=1&utm_source=import-plugin-free&utm_medium=upgrade-notice&utm_campaign=images" target="_blank" class="upgrade_link"><?php _e('Upgrade to the Pro edition of WP All Import to Import Images', 'pmxi_plugin');?></a>
|
||||
<p><?php _e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_import_plugin'); ?></p>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
<table class="form-table" style="max-width:none;">
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="input">
|
||||
<div class="input">
|
||||
<input type="radio" name="<?php echo esc_attr($section_slug); ?>download_images" value="yes" class="switcher" id="<?php echo esc_attr($section_slug); ?>download_images_yes" <?php echo ("yes" == $post[$section_slug . 'download_images']) ? 'checked="checked"' : '';?>/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>download_images_yes"><?php _e('Download images hosted elsewhere'); ?></label>
|
||||
<a href="#help" class="wpallimport-help" title="<?php _e('http:// or https://', 'wp_all_import_plugin') ?>" style="position: relative; top: -2px;">?</a>
|
||||
</div>
|
||||
<div class="switcher-target-<?php echo esc_attr($section_slug); ?>download_images_yes" style="padding-left:27px;">
|
||||
<label for="<?php echo esc_attr($section_slug); ?>download_featured_delim"><?php _e('Enter image URL one per line, or separate them with a ', 'wp_all_import_plugin');?></label>
|
||||
<input type="text" class="small" id="<?php echo esc_attr($section_slug); ?>download_featured_delim" name="<?php echo esc_attr($section_slug); ?>download_featured_delim" value="<?php echo esc_attr($post[$section_slug . 'download_featured_delim']) ?>" style="width:5%; text-align:center;"/>
|
||||
<textarea name="<?php echo esc_attr($section_slug); ?>download_featured_image" class="newline rad4" style="clear: both; display:block;" placeholder=""><?php echo esc_textarea(wp_all_import_filter_html_kses($post[$section_slug . 'download_featured_image'])) ?></textarea>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="radio" name="<?php echo esc_attr($section_slug); ?>download_images" value="gallery" class="switcher" id="<?php echo esc_attr($section_slug); ?>download_images_gallery" <?php echo ("gallery" == $post[$section_slug . 'download_images']) ? 'checked="checked"' : '';?>/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>download_images_gallery"><?php _e('Use images currently in Media Library'); ?></label>
|
||||
<!--a href="#help" class="wpallimport-help" title="<?php _e('http:// or https://', 'wp_all_import_plugin') ?>" style="position: relative; top: -2px;">?</a-->
|
||||
</div>
|
||||
<div class="switcher-target-<?php echo esc_attr($section_slug); ?>download_images_gallery" style="padding-left:27px;">
|
||||
<label for="<?php echo esc_attr($section_slug); ?>gallery_featured_delim"><?php _e('Enter image filenames one per line, or separate them with a ', 'wp_all_import_plugin');?></label>
|
||||
<input type="text" class="small" id="<?php echo esc_attr($section_slug); ?>gallery_featured_delim" name="<?php echo esc_attr($section_slug); ?>gallery_featured_delim" value="<?php echo esc_attr($post[$section_slug . 'gallery_featured_delim']) ?>" style="width:5%; text-align:center;"/>
|
||||
<textarea name="<?php echo esc_attr($section_slug); ?>gallery_featured_image" class="newline rad4" style="clear: both; display:block; "><?php echo esc_textarea(wp_all_import_filter_html_kses($post[$section_slug . 'gallery_featured_image'])) ?></textarea>
|
||||
</div>
|
||||
<div class="input">
|
||||
<?php $wp_uploads = wp_upload_dir(); ?>
|
||||
<input type="radio" name="<?php echo esc_attr($section_slug); ?>download_images" value="no" class="switcher" id="<?php echo esc_attr($section_slug); ?>download_images_no" <?php echo ("no" == $post[$section_slug . 'download_images']) ? 'checked="checked"' : '';?>/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>download_images_no"><?php printf(__('Use images currently uploaded in %s', 'wp_all_import_plugin'), preg_replace('%.*wp-content/%', 'wp-content/', esc_attr($wp_uploads['basedir'] . DIRECTORY_SEPARATOR . PMXI_Plugin::FILES_DIRECTORY . DIRECTORY_SEPARATOR)) ); ?></label>
|
||||
</div>
|
||||
<div class="switcher-target-<?php echo esc_attr($section_slug); ?>download_images_no" style="padding-left:27px;">
|
||||
<label for="<?php echo esc_attr($section_slug); ?>featured_delim"><?php _e('Enter image filenames one per line, or separate them with a ', 'wp_all_import_plugin');?></label>
|
||||
<input type="text" class="small" id="<?php echo esc_attr($section_slug); ?>featured_delim" name="<?php echo esc_attr($section_slug); ?>featured_delim" value="<?php echo esc_attr($post[$section_slug . 'featured_delim']) ?>" style="width:5%; text-align:center;"/>
|
||||
<textarea name="<?php echo esc_attr($section_slug); ?>featured_image" class="newline rad4" style="clear: both; display:block; "><?php echo esc_textarea(wp_all_import_filter_html_kses($post[$section_slug . 'featured_image'])) ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<h4><?php _e('Image Options', 'wp_all_import_plugin'); ?></h4>
|
||||
<div class="search_through_the_media_library">
|
||||
<div class="input" style="margin:3px;">
|
||||
<input type="hidden" name="<?php echo esc_attr($section_slug); ?>search_existing_images" value="0" />
|
||||
<input type="checkbox" id="<?php echo esc_attr($section_slug); ?>search_existing_images" name="<?php echo esc_attr($section_slug); ?>search_existing_images" value="1" <?php echo $post[$section_slug . 'search_existing_images'] ? 'checked="checked"' : '' ?> class="switcher fix_checkbox"/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>search_existing_images"><?php _e('Search through the Media Library for existing images before importing new images','wp_all_import_plugin');?> </label>
|
||||
<a href="#help" class="wpallimport-help" title="<?php _e('If an image with the same file name or remote URL is found in the Media Library then that image will be attached to this record instead of importing a new image. Disable this setting if you always want to download a new image.', 'wp_all_import_plugin') ?>" style="position: relative; top: -2px;">?</a>
|
||||
<div class="switcher-target-<?php echo esc_attr($section_slug); ?>search_existing_images" style="padding-left:23px;">
|
||||
<div class="search_through_the_media_library_logic">
|
||||
<div class="input">
|
||||
<input type="radio" id="<?php echo esc_attr($section_slug); ?>search_existing_images_logic_url" name="<?php echo esc_attr($section_slug); ?>search_existing_images_logic" value="by_url" <?php echo ( "by_url" == $post[$section_slug . 'search_existing_images_logic'] ) ? 'checked="checked"': '' ?>/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>search_existing_images_logic_url"><?php _e('Match image by URL', 'wp_all_import_plugin') ?></label>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="radio" id="<?php echo esc_attr($section_slug); ?>search_existing_images_logic_filename" name="<?php echo esc_attr($section_slug); ?>search_existing_images_logic" value="by_filename" <?php echo ( "by_filename" == $post[$section_slug . 'search_existing_images_logic'] ) ? 'checked="checked"': '' ?>/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>search_existing_images_logic_filename"><?php _e('Match image by filename', 'wp_all_import_plugin') ?></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input" style="margin: 3px;">
|
||||
<input type="hidden" name="<?php echo esc_attr($section_slug); ?>do_not_remove_images" value="0" />
|
||||
<input type="checkbox" id="<?php echo esc_attr($section_slug); ?>do_not_remove_images" name="<?php echo esc_attr($section_slug); ?>do_not_remove_images" value="1" <?php echo $post[$section_slug . 'do_not_remove_images'] ? 'checked="checked"': '' ?> />
|
||||
<label for="<?php echo esc_attr($section_slug); ?>do_not_remove_images"><?php _e('Keep images currently in Media Library', 'wp_all_import_plugin') ?></label>
|
||||
<a href="#help" class="wpallimport-help" title="<?php _e('If disabled, images attached to imported posts will be deleted and then all images will be imported.', 'wp_all_import_plugin') ?>" style="position:relative; top: -2px;">?</a>
|
||||
</div>
|
||||
<?php if ($section_type == 'images'): ?>
|
||||
<div class="input" style="margin: 3px;">
|
||||
<input type="hidden" name="<?php echo esc_attr($section_slug); ?>import_img_tags" value="0" />
|
||||
<input type="checkbox" id="<?php echo esc_attr($section_slug); ?>import_img_tags" name="<?php echo esc_attr($section_slug); ?>import_img_tags" value="1" <?php echo (isset($post[$section_slug . 'import_img_tags']) && $post[$section_slug . 'import_img_tags']) ? 'checked="checked"': '' ?> />
|
||||
<label for="<?php echo esc_attr($section_slug); ?>import_img_tags"><?php _e('Scan through post content and import images wrapped in <img> tags', 'wp_all_import_plugin') ?></label>
|
||||
<a href="#help" class="wpallimport-help" title="<?php _e('Only images hosted on other sites will be imported. Images will be imported to WordPress and the <img> tag updated with the new image URL.', 'wp_all_import_plugin') ?>" style="position:relative; top: -2px;">?</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if ($section_type == 'images'): ?>
|
||||
<div class="input">
|
||||
<input type="hidden" value="<?php echo esc_attr($section_slug); ?>" class="wp_all_import_section_slug"/>
|
||||
<a class="preview_images" href="javascript:void(0);" rel="preview_images"><?php _e('Preview & Test', 'wp_all_import_plugin'); ?></a>
|
||||
</div>
|
||||
<div class="input" style="margin:3px;">
|
||||
<input type="hidden" name="<?php echo esc_attr($section_slug); ?>is_featured" value="0" />
|
||||
<input type="checkbox" id="<?php echo esc_attr($section_slug); ?>is_featured" name="<?php echo esc_attr($section_slug); ?>is_featured" value="1" <?php echo $post[$section_slug . 'is_featured'] ? 'checked="checked"' : '' ?> class="fix_checkbox"/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>is_featured"><?php _e('Set the first image to the Featured Image (_thumbnail_id)','wp_all_import_plugin');?> </label>
|
||||
</div>
|
||||
<div class="input" style="margin:3px;">
|
||||
<input type="hidden" name="<?php echo esc_attr($section_slug); ?>create_draft" value="no" />
|
||||
<input type="checkbox" id="<?php echo esc_attr($section_slug); ?>create_draft" name="<?php echo esc_attr($section_slug); ?>create_draft" value="yes" <?php echo 'yes' == $post[$section_slug . 'create_draft'] ? 'checked="checked"' : '' ?> class="fix_checkbox"/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>create_draft"><?php _e('If no images are downloaded successfully, create entry as Draft.', 'wp_all_import_plugin') ?></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="wpallimport-collapsed closed wpallimport-section">
|
||||
<div class="wpallimport-content-section rad0" style="margin:0; border-top:1px solid #ddd; border-bottom: none; border-right: none; border-left: none; background: #f1f2f2;">
|
||||
<div class="wpallimport-collapsed-header">
|
||||
<h3 style="color:#40acad;"><?php _e('SEO & Advanced Options','wp_all_import_plugin');?></h3>
|
||||
</div>
|
||||
<div class="wpallimport-collapsed-content" style="padding: 0;">
|
||||
<div class="wpallimport-collapsed-content-inner">
|
||||
<hr>
|
||||
<table class="form-table" style="max-width:none;">
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<h4><?php _e('Meta Data', 'wp_all_import_plugin'); ?></h4>
|
||||
<div class="input">
|
||||
<input type="hidden" name="<?php echo esc_attr($section_slug); ?>set_image_meta_title" value="0" />
|
||||
<input type="checkbox" id="<?php echo esc_attr($section_slug); ?>set_image_meta_title" name="<?php echo esc_attr($section_slug); ?>set_image_meta_title" value="1" <?php echo $post[$section_slug . 'set_image_meta_title'] ? 'checked="checked"' : '' ?> class="switcher fix_checkbox"/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>set_image_meta_title"><?php _e('Set Title(s)','wp_all_import_plugin');?></label>
|
||||
<div class="switcher-target-<?php echo esc_attr($section_slug); ?>set_image_meta_title" style="padding-left:23px;">
|
||||
<label for="<?php echo esc_attr($section_slug); ?>image_meta_title_delim"><?php _e('Enter one per line, or separate them with a ', 'wp_all_import_plugin');?></label>
|
||||
<input type="text" class="small" id="<?php echo esc_attr($section_slug); ?>image_meta_title_delim" name="<?php echo esc_attr($section_slug); ?>image_meta_title_delim" value="<?php echo esc_attr($post[$section_slug . 'image_meta_title_delim']) ?>" style="width:5%; text-align:center;"/>
|
||||
<p style="margin-bottom:5px;"><?php _e('The first title will be linked to the first image, the second title will be linked to the second image, ...', 'wp_all_import_plugin');?></p>
|
||||
<textarea name="<?php echo esc_attr($section_slug); ?>image_meta_title" class="newline rad4"><?php echo esc_attr($post[$section_slug . 'image_meta_title']) ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="hidden" name="<?php echo esc_attr($section_slug); ?>set_image_meta_caption" value="0" />
|
||||
<input type="checkbox" id="<?php echo esc_attr($section_slug); ?>set_image_meta_caption" name="<?php echo esc_attr($section_slug); ?>set_image_meta_caption" value="1" <?php echo $post[$section_slug . 'set_image_meta_caption'] ? 'checked="checked"' : '' ?> class="switcher fix_checkbox"/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>set_image_meta_caption"><?php _e('Set Caption(s)','wp_all_import_plugin');?></label>
|
||||
<div class="switcher-target-<?php echo esc_attr($section_slug); ?>set_image_meta_caption" style="padding-left:23px;">
|
||||
<label for="<?php echo esc_attr($section_slug); ?>image_meta_caption_delim"><?php _e('Enter one per line, or separate them with a ', 'wp_all_import_plugin');?></label>
|
||||
<input type="text" class="small" id="<?php echo esc_attr($section_slug); ?>image_meta_caption_delim" name="<?php echo esc_attr($section_slug); ?>image_meta_caption_delim" value="<?php echo esc_attr($post[$section_slug . 'image_meta_caption_delim']) ?>" style="width:5%; text-align:center;"/>
|
||||
<p style="margin-bottom:5px;"><?php _e('The first caption will be linked to the first image, the second caption will be linked to the second image, ...', 'wp_all_import_plugin');?></p>
|
||||
<textarea name="<?php echo esc_attr($section_slug); ?>image_meta_caption" class="newline rad4"><?php echo esc_attr($post[$section_slug . 'image_meta_caption']) ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="hidden" name="<?php echo esc_attr($section_slug); ?>set_image_meta_alt" value="0" />
|
||||
<input type="checkbox" id="<?php echo esc_attr($section_slug); ?>set_image_meta_alt" name="<?php echo esc_attr($section_slug); ?>set_image_meta_alt" value="1" <?php echo $post[$section_slug . 'set_image_meta_alt'] ? 'checked="checked"' : '' ?> class="switcher fix_checkbox"/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>set_image_meta_alt"><?php _e('Set Alt Text(s)','wp_all_import_plugin');?></label>
|
||||
<div class="switcher-target-<?php echo esc_attr($section_slug); ?>set_image_meta_alt" style="padding-left:23px;">
|
||||
<label for="<?php echo esc_attr($section_slug); ?>image_meta_alt_delim"><?php _e('Enter one per line, or separate them with a ', 'wp_all_import_plugin');?></label>
|
||||
<input type="text" class="small" id="<?php echo esc_attr($section_slug); ?>image_meta_alt_delim" name="<?php echo esc_attr($section_slug); ?>image_meta_alt_delim" value="<?php echo esc_attr($post[$section_slug . 'image_meta_alt_delim']) ?>" style="width:5%; text-align:center;"/>
|
||||
<p style="margin-bottom:5px;"><?php _e('The first alt text will be linked to the first image, the second alt text will be linked to the second image, ...', 'wp_all_import_plugin');?></p>
|
||||
<textarea name="<?php echo esc_attr($section_slug); ?>image_meta_alt" class="newline rad4"><?php echo esc_attr($post[$section_slug . 'image_meta_alt']) ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="hidden" name="<?php echo esc_attr($section_slug); ?>set_image_meta_description" value="0" />
|
||||
<input type="checkbox" id="<?php echo esc_attr($section_slug); ?>set_image_meta_description" name="<?php echo esc_attr($section_slug); ?>set_image_meta_description" value="1" <?php echo $post[$section_slug . 'set_image_meta_description'] ? 'checked="checked"' : '' ?> class="switcher fix_checkbox"/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>set_image_meta_description"><?php _e('Set Description(s)','wp_all_import_plugin');?></label>
|
||||
<div class="switcher-target-<?php echo esc_attr($section_slug); ?>set_image_meta_description" style="padding-left:23px;">
|
||||
<div class="input">
|
||||
<input id="<?php echo esc_attr($section_slug); ?>image_meta_description_delim_logic_separate" type="radio" name="<?php echo esc_attr($section_slug); ?>image_meta_description_delim_logic" value="separate" <?php echo ($post[$section_slug . 'image_meta_description_delim_logic'] == 'separate' and ! empty($post[$section_slug . 'image_meta_description_delim'])) ? 'checked="checked"' : ''; ?>/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>image_meta_description_delim_logic_separate"><?php _e('Separate them with a', 'wp_all_import_plugin'); ?></label>
|
||||
<input type="text" class="small" id="<?php echo esc_attr($section_slug); ?>image_meta_description_delim" name="<?php echo esc_attr($section_slug); ?>image_meta_description_delim" value="<?php echo esc_attr($post[$section_slug . 'image_meta_description_delim']) ?>" style="width:5%; text-align:center;"/>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input id="<?php echo esc_attr($section_slug); ?>image_meta_description_delim_logic_line" type="radio" name="<?php echo esc_attr($section_slug); ?>image_meta_description_delim_logic" value="line" <?php echo ($post[$section_slug . 'image_meta_description_delim_logic'] == 'line' or empty($post[$section_slug . 'image_meta_description_delim'])) ? 'checked="checked"' : ''; ?>/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>image_meta_description_delim_logic_line"><?php _e('Enter them one per line', 'wp_all_import_plugin'); ?></label>
|
||||
</div>
|
||||
<p style="margin-bottom:5px;"><?php _e('The first description will be linked to the first image, the second description will be linked to the second image, ...', 'wp_all_import_plugin');?></p>
|
||||
<textarea name="<?php echo esc_attr($section_slug); ?>image_meta_description" class="newline rad4"><?php echo esc_attr($post[$section_slug . 'image_meta_description']) ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<h4><?php _e('Files', 'wp_all_import_plugin'); ?></h4>
|
||||
<div class="advanced_options_files">
|
||||
<p style="font-style:italic; display:none;"><?php _e('These options not available if Use images currently in Media Library is selected above.', 'wp_all_import_plugin'); ?></p>
|
||||
<div class="input" style="margin:3px 0px;">
|
||||
<input type="hidden" name="<?php echo esc_attr($section_slug); ?>auto_rename_images" value="0" />
|
||||
<input type="checkbox" id="<?php echo esc_attr($section_slug); ?>auto_rename_images" name="<?php echo esc_attr($section_slug); ?>auto_rename_images" value="1" <?php echo $post[$section_slug . 'auto_rename_images'] ? 'checked="checked"' : ''; ?> class="switcher fix_checkbox"/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>auto_rename_images"><?php _e('Change image file names to','wp_all_import_plugin');?> </label>
|
||||
<div class="input switcher-target-<?php echo esc_attr($section_slug); ?>auto_rename_images" style="padding-left:23px;">
|
||||
<input type="text" id="<?php echo esc_attr($section_slug); ?>auto_rename_images_suffix" name="<?php echo esc_attr($section_slug); ?>auto_rename_images_suffix" value="<?php echo esc_attr($post[$section_slug . 'auto_rename_images_suffix']) ?>" style="width:480px;"/>
|
||||
<p class="note"><?php _e('Multiple image will have numbers appended, i.e. image-name-1.jpg, image-name-2.jpg '); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input" style="margin:3px 0px;">
|
||||
<input type="hidden" name="<?php echo esc_attr($section_slug); ?>auto_set_extension" value="0" />
|
||||
<input type="checkbox" id="<?php echo esc_attr($section_slug); ?>auto_set_extension" name="<?php echo esc_attr($section_slug); ?>auto_set_extension" value="1" <?php echo $post[$section_slug . 'auto_set_extension'] ? 'checked="checked"' : '' ?> class="switcher fix_checkbox"/>
|
||||
<label for="<?php echo esc_attr($section_slug); ?>auto_set_extension"><?php _e('Change image file extensions','wp_all_import_plugin');?> </label>
|
||||
<div class="input switcher-target-<?php echo esc_attr($section_slug); ?>auto_set_extension" style="padding-left:23px;">
|
||||
<input type="text" id="<?php echo esc_attr($section_slug); ?>new_extension" name="<?php echo esc_attr($section_slug); ?>new_extension" value="<?php echo esc_attr($post[$section_slug . 'new_extension']) ?>" placeholder="jpg" style="width:480px;"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="images_hints" style="display:none;">
|
||||
<ul>
|
||||
<li><?php _e('WP All Import will automatically ignore elements with blank image URLs/filenames.', 'wp_all_import_plugin'); ?></li>
|
||||
<li><?php _e('WP All Import must download the images to your server. You can\'t have images in a Gallery that are referenced by external URL. That\'s just how WordPress works.', 'wp_all_import_plugin'); ?></li>
|
||||
<li><?php printf(__('Importing a variable number of images can be done using a <a href="%s" target="_blank">FOREACH LOOP</a>', 'wp_all_import_plugin'), 'https://www.wpallimport.com/documentation/developers/custom-code/foreach-loops/'); ?></li>
|
||||
<li><?php printf(__('For more information check out our <a href="%s" target="_blank">comprehensive documentation</a>', 'wp_all_import_plugin'), 'https://www.wpallimport.com/documentation/'); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php $custom_type = get_post_type_object( $post_type ); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
var plugin_url = '<?php echo esc_url(WP_ALL_IMPORT_ROOT_URL); ?>';
|
||||
</script>
|
||||
|
||||
<div class="wpallimport-collapsed closed nested_options wpallimport-section">
|
||||
<div class="wpallimport-content-section">
|
||||
<div class="wpallimport-collapsed-header">
|
||||
<h3><?php _e('Nested XML/CSV files','wp_all_import_plugin');?></h3>
|
||||
</div>
|
||||
<div class="wpallimport-collapsed-content">
|
||||
<table class="form-table" style="max-width:none;">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="nested_files">
|
||||
<ul>
|
||||
<?php if ( ! empty($post['nested_files'])): ?>
|
||||
<?php
|
||||
$nested_files = json_decode($post['nested_files'], true);
|
||||
foreach ($nested_files as $key => $file) {
|
||||
?>
|
||||
<li rel="<?php echo esc_attr($key);?>"><?php echo esc_html($file);?> <a href="javascript:void(0);" class="unmerge"><?php _e('remove', 'wp_all_import_plugin'); ?></a></li>
|
||||
<?php
|
||||
}?>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<input type="hidden" value="<?php echo esc_attr($post['nested_files']); ?>" name="nested_files"/>
|
||||
</div>
|
||||
<div class="nested_xml">
|
||||
<div class="input" style="margin-left:15px;">
|
||||
<input type="hidden" name="nested_local_path"/>
|
||||
<input type="hidden" name="nested_source_path"/>
|
||||
<input type="hidden" name="nested_root_element"/>
|
||||
<div class="nested_msgs"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="add_nested_file">
|
||||
|
||||
<div class="msgs"></div>
|
||||
|
||||
<div class="file-type-options">
|
||||
<label><?php _e('Specify the URL of the nested file to use.', 'wp_all_import_plugin'); ?></label>
|
||||
<input type="text" class="regular-text" name="nested_url" value="" style="width:100%; line-height:20px;" placeholder="http(s)://"/>
|
||||
</div>
|
||||
|
||||
<a rel="parse" href="javascript:void(0);" class="parse"><?php _e('Add', 'wp_all_import_plugin'); ?></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,298 @@
|
||||
<?php
|
||||
$custom_type = get_post_type_object( $post_type );
|
||||
?>
|
||||
|
||||
<div class="wpallimport-collapsed closed wpallimport-section ">
|
||||
<div class="wpallimport-content-section ">
|
||||
<div class="wpallimport-collapsed-header">
|
||||
<h3><?php printf(__('Other %s Options','wp_all_import_plugin'), esc_attr($custom_type->labels->singular_name));?></h3>
|
||||
</div>
|
||||
<div class="wpallimport-collapsed-content" style="padding: 0;">
|
||||
<div class="wpallimport-collapsed-content-inner">
|
||||
<table class="form-table" style="max-width:none;">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" name="encoding" value="<?php echo ($this->isWizard) ? esc_attr(PMXI_Plugin::$session->encoding) : esc_attr($post['encoding']); ?>"/>
|
||||
<input type="hidden" name="delimiter" value="<?php echo ($this->isWizard) ? esc_attr(PMXI_Plugin::$session->is_csv) : esc_attr($post['delimiter']); ?>"/>
|
||||
|
||||
<?php $is_support_post_format = ( current_theme_supports( 'post-formats' ) && post_type_supports( $post_type, 'post-formats' ) ) ? true : false; ?>
|
||||
|
||||
<h4><?php _e('Post Status', 'wp_all_import_plugin') ?></h4>
|
||||
<div class="input">
|
||||
<input type="radio" id="status_publish" name="status" value="publish" <?php echo 'publish' == $post['status'] ? 'checked="checked"' : '' ?> class="switcher"/>
|
||||
<label for="status_publish"><?php _e('Published', 'wp_all_import_plugin') ?></label>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="radio" id="status_draft" name="status" value="draft" <?php echo 'draft' == $post['status'] ? 'checked="checked"' : '' ?> class="switcher"/>
|
||||
<label for="status_draft"><?php _e('Draft', 'wp_all_import_plugin') ?></label>
|
||||
</div>
|
||||
<div class="input fleft" style="position:relative;width:220px;">
|
||||
<input type="radio" id="status_xpath" class="switcher" name="status" value="xpath" <?php echo 'xpath' == $post['status'] ? 'checked="checked"': '' ?>/>
|
||||
<label for="status_xpath"><?php _e('Set with XPath', 'wp_all_import_plugin' )?></label> <br>
|
||||
<div class="switcher-target-status_xpath">
|
||||
<div class="input">
|
||||
<input type="text" class="smaller-text" name="status_xpath" style="width:190px;" value="<?php echo esc_attr($post['status_xpath']) ?>"/>
|
||||
<a href="#help" class="wpallimport-help" title="<?php _e('The value of presented XPath should be one of the following: (\'publish\', \'draft\', \'trash\', \'private\').', 'wp_all_import_plugin') ?>" style="position:relative; top:13px; float: right;">?</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4><?php _e('Post Dates', 'wp_all_import_plugin') ?><a href="#help" class="wpallimport-help" style="position:relative; top: 1px;" title="<?php _e('Use any format supported by the PHP <b>strtotime</b> function. That means pretty much any human-readable date will work.', 'wp_all_import_plugin') ?>">?</a></h4>
|
||||
<div class="input">
|
||||
<input type="radio" id="date_type_specific" class="switcher" name="date_type" value="specific" <?php echo 'random' != $post['date_type'] ? 'checked="checked"' : '' ?> />
|
||||
<label for="date_type_specific">
|
||||
<?php _e('As specified', 'wp_all_import_plugin') ?>
|
||||
</label>
|
||||
<div class="switcher-target-date_type_specific" style="vertical-align:middle; margin-top: 5px; margin-bottom: 10px;">
|
||||
<input type="text" class="datepicker" name="date" value="<?php echo esc_attr($post['date']) ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="radio" id="date_type_random" class="switcher" name="date_type" value="random" <?php echo 'random' == $post['date_type'] ? 'checked="checked"' : '' ?> />
|
||||
<label for="date_type_random">
|
||||
<?php _e('Random dates', 'wp_all_import_plugin') ?><a href="#help" class="wpallimport-help" style="position:relative; top:0;" title="<?php _e('Posts will be randomly assigned dates in this range. WordPress ensures posts with dates in the future will not appear until their date has been reached.', 'wp_all_import_plugin') ?>">?</a>
|
||||
</label>
|
||||
<div class="switcher-target-date_type_random" style="vertical-align:middle; margin-top:5px;">
|
||||
<input type="text" class="datepicker" name="date_start" value="<?php echo esc_attr($post['date_start']) ?>" />
|
||||
<?php _e('and', 'wp_all_import_plugin') ?>
|
||||
<input type="text" class="datepicker" name="date_end" value="<?php echo esc_attr($post['date_end']) ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4><?php _e('Comments', 'wp_all_import_plugin'); ?></h4>
|
||||
<div class="input">
|
||||
<input type="radio" id="comment_status_open" name="comment_status" value="open" <?php echo 'open' == $post['comment_status'] ? 'checked="checked"' : '' ?> class="switcher"/>
|
||||
<label for="comment_status_open"><?php _e('Open', 'wp_all_import_plugin') ?></label>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="radio" id="comment_status_closed" name="comment_status" value="closed" <?php echo 'closed' == $post['comment_status'] ? 'checked="checked"' : '' ?> class="switcher"/>
|
||||
<label for="comment_status_closed"><?php _e('Closed', 'wp_all_import_plugin') ?></label>
|
||||
</div>
|
||||
<div class="input fleft" style="position:relative;width:220px;">
|
||||
<input type="radio" id="comment_status_xpath" class="switcher" name="comment_status" value="xpath" <?php echo 'xpath' == $post['comment_status'] ? 'checked="checked"': '' ?>/>
|
||||
<label for="comment_status_xpath"><?php _e('Set with XPath', 'wp_all_import_plugin' )?></label> <br>
|
||||
<div class="switcher-target-comment_status_xpath">
|
||||
<div class="input">
|
||||
<input type="text" class="smaller-text" name="comment_status_xpath" style="width:190px;" value="<?php echo esc_attr($post['comment_status_xpath']) ?>"/>
|
||||
<a href="#help" class="wpallimport-help" title="<?php _e('The value of presented XPath should be one of the following: (\'open\', \'closed\').', 'wp_all_import_plugin') ?>" style="position:relative; top:13px; float: right;">?</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4><?php _e('Trackbacks and Pingbacks', 'wp_all_import_plugin'); ?></h4>
|
||||
<div class="input">
|
||||
<input type="radio" id="ping_status_open" name="ping_status" value="open" <?php echo 'open' == $post['ping_status'] ? 'checked="checked"' : '' ?> class="switcher"/>
|
||||
<label for="ping_status_open"><?php _e('Open', 'wp_all_import_plugin') ?></label>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="radio" id="ping_status_closed" name="ping_status" value="closed" <?php echo 'closed' == $post['ping_status'] ? 'checked="checked"' : '' ?> class="switcher"/>
|
||||
<label for="ping_status_closed"><?php _e('Closed', 'wp_all_import_plugin') ?></label>
|
||||
</div>
|
||||
<div class="input fleft" style="position:relative;width:220px;">
|
||||
<input type="radio" id="ping_status_xpath" class="switcher" name="ping_status" value="xpath" <?php echo 'xpath' == $post['ping_status'] ? 'checked="checked"': '' ?>/>
|
||||
<label for="ping_status_xpath"><?php _e('Set with XPath', 'wp_all_import_plugin' )?></label> <br>
|
||||
<div class="switcher-target-ping_status_xpath">
|
||||
<div class="input">
|
||||
<input type="text" class="smaller-text" name="ping_status_xpath" style="width:190px;" value="<?php echo esc_attr($post['ping_status_xpath']) ?>"/>
|
||||
<a href="#help" class="wpallimport-help" title="<?php _e('The value of presented XPath should be one of the following: (\'open\', \'closed\').', 'wp_all_import_plugin') ?>" style="position:relative; top:13px; float: right;">?</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4><?php _e('Post Slug', 'wp_all_import_plugin') ?></h4>
|
||||
<div>
|
||||
<input type="text" name="post_slug" style="width:100%;" value="<?php echo esc_attr($post['post_slug']); ?>" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4><?php _e('Post Author', 'wp_all_import_plugin') ?></h4>
|
||||
<div>
|
||||
<input type="text" name="author" value="<?php echo esc_attr($post['author']) ?>"/> <a href="#help" class="wpallimport-help" style="position: relative; top: -2px;" title="<?php _e('Assign the post to an existing user account by specifying the user ID, username, or e-mail address.', 'wp_all_import_plugin') ?>">?</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4><?php _e('Download & Import Attachments', 'wp_all_import_plugin') ?></h4>
|
||||
<div class="delimiter-field">
|
||||
<input type="text" name="attachments" value="<?php echo esc_attr($post['attachments']) ?>" />
|
||||
<input type="text" class="small" name="atch_delim" value="<?php echo esc_attr($post['atch_delim']) ?>" />
|
||||
</div>
|
||||
<div class="input" style="margin:3px;">
|
||||
<input type="hidden" name="is_search_existing_attach" value="0" />
|
||||
<input type="checkbox" id="is_search_existing_attach" name="is_search_existing_attach" value="1" <?php echo $post['is_search_existing_attach'] ? 'checked="checked"' : '' ?> class="fix_checkbox"/>
|
||||
<label for="is_search_existing_attach"><?php _e('Search for existing attachments to prevent duplicates in media library','wp_all_import_plugin');?> </label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($is_support_post_format):?>
|
||||
<tr>
|
||||
<td>
|
||||
<h4><?php _e('Post Format', 'wp_all_import_plugin') ?></h4>
|
||||
<div>
|
||||
<?php $post_formats = get_theme_support( 'post-formats' ); ?>
|
||||
|
||||
<div class="input">
|
||||
<input type="radio" id="post_format_<?php echo "standart_" . esc_attr($post_type); ?>" name="post_format" value="0" <?php echo (empty($post['post_format']) or ( empty($post_formats) )) ? 'checked="checked"' : '' ?> />
|
||||
<label for="post_format_<?php echo "standart_" . esc_attr($post_type); ?>"><?php _e( "Standard", 'wp_all_import_plugin') ?></label>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ( ! empty($post_formats[0]) ){
|
||||
foreach ($post_formats[0] as $post_format) {
|
||||
?>
|
||||
<div class="input">
|
||||
<input type="radio" id="post_format_<?php echo esc_attr($post_format); ?>" name="post_format" value="<?php echo esc_attr($post_format); ?>" <?php echo $post_format == $post['post_format'] ? 'checked="checked"' : '' ?> />
|
||||
<label for="post_format_<?php echo esc_attr($post_format); ?>"><?php _e( ucfirst(esc_attr($post_format)), 'wp_all_import_plugin') ?></label>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="input fleft" style="position:relative;width:220px; ">
|
||||
<input type="radio" id="post_format_xpath" class="switcher" name="post_format" value="xpath" <?php echo 'xpath' == $post['post_format'] ? 'checked="checked"': '' ?>/>
|
||||
<label for="post_format_xpath"><?php _e('Set with XPath', 'wp_all_import_plugin' )?></label> <br>
|
||||
<div class="switcher-target-post_format_xpath">
|
||||
<div class="input">
|
||||
<input type="text" class="smaller-text" name="post_format_xpath" style="width:190px;" value="<?php echo esc_attr($post['post_format_xpath']) ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
global $wp_version;
|
||||
if ( 'page' == $post_type || version_compare($wp_version, '4.7.0', '>=') ):?>
|
||||
<tr>
|
||||
<td>
|
||||
<h4><?php _e('Page Template', 'wp_all_import_plugin') ?></h4>
|
||||
<div class="input">
|
||||
<input type="radio" id="is_multiple_page_template_yes" name="is_multiple_page_template" value="yes" <?php echo 'yes' == $post['is_multiple_page_template'] ? 'checked="checked"' : '' ?> class="switcher" style="margin-left:0;"/>
|
||||
<label for="is_multiple_page_template_yes"><?php _e('Select a template', 'wp_all_import_plugin') ?></label>
|
||||
<div class="switcher-target-is_multiple_page_template_yes">
|
||||
<div class="input">
|
||||
<select name="page_template" id="page_template">
|
||||
<option value='default'><?php _e('Default', 'wp_all_import_plugin') ?></option>
|
||||
<?php page_template_dropdown($post['page_template']); ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input fleft" style="position:relative;width:220px; margin-top: 5px;">
|
||||
<input type="radio" id="is_multiple_page_template_no" class="switcher" name="is_multiple_page_template" value="no" <?php echo 'no' == $post['is_multiple_page_template'] ? 'checked="checked"': '' ?> style="margin-left:0;"/>
|
||||
<label for="is_multiple_page_template_no"><?php _e('Set with XPath', 'wp_all_import_plugin' )?></label> <br>
|
||||
<div class="switcher-target-is_multiple_page_template_no">
|
||||
<div class="input">
|
||||
<input type="text" class="smaller-text" name="single_page_template" style="width:190px;" value="<?php echo esc_attr($post['single_page_template']) ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if ( 'page' == $post_type ):?>
|
||||
|
||||
<h4><?php _e('Page Parent', 'wp_all_import_plugin') ?><a href="#help" class="wpallimport-help" title="<?php _e('Enter the ID, title, or slug of the desired page parent. If adding the child and parent pages in the same import, set \'Records per Iteration\' to 1, run the import twice, or run separate imports for child and parent pages.', 'wp_all_import_plugin') ?>" style="position:relative; top:-1px;">?</a></h4>
|
||||
|
||||
<div class="input">
|
||||
<input type="radio" id="is_multiple_page_parent_yes" name="is_multiple_page_parent" value="yes" <?php echo 'yes' == $post['is_multiple_page_parent'] ? 'checked="checked"' : '' ?> class="switcher" style="margin-left:0;"/>
|
||||
<label for="is_multiple_page_parent_yes"><?php _e('Select page parent', 'wp_all_import_plugin') ?></label>
|
||||
<div class="switcher-target-is_multiple_page_parent_yes">
|
||||
<div class="input">
|
||||
<?php wp_dropdown_pages(array('post_type' => 'page', 'selected' => $post['parent'], 'name' => 'parent', 'show_option_none' => __('(no parent)', 'wp_all_import_plugin'), 'sort_column'=> 'menu_order, post_title', 'number' => 500)); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input fleft" style="position:relative;width:220px; margin-top: 5px;">
|
||||
<input type="radio" id="is_multiple_page_parent_no" class="switcher" name="is_multiple_page_parent" value="no" <?php echo 'no' == $post['is_multiple_page_parent'] ? 'checked="checked"': '' ?> style="margin-left:0;"/>
|
||||
<label for="is_multiple_page_parent_no"><?php _e('Set with XPath', 'wp_all_import_plugin' )?></label> <br>
|
||||
<div class="switcher-target-is_multiple_page_parent_no">
|
||||
<div class="input">
|
||||
<input type="text" class="smaller-text" name="single_page_parent" style="width:190px;" value="<?php echo esc_attr($post['single_page_parent']) ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif;?>
|
||||
|
||||
<?php if ( 'page' != $post_type && $custom_type->hierarchical ): ?>
|
||||
|
||||
<h4><?php _e('Post Parent', 'wp_all_import_plugin') ?><a href="#help" class="wpallimport-help" title="<?php _e('Enter the ID, title, or slug of the desired post parent. If adding the child and parent posts in the same import, set \'Records per Iteration\' to 1, run the import twice, or run separate imports for child and parent posts.', 'wp_all_import_plugin') ?>" style="position:relative; top:-1px;">?</a></h4>
|
||||
|
||||
<div class="input">
|
||||
<input type="radio" id="is_multiple_page_parent_yes" name="is_multiple_page_parent" value="yes" <?php echo 'yes' == $post['is_multiple_page_parent'] ? 'checked="checked"' : '' ?> class="switcher" style="margin-left:0;"/>
|
||||
<label for="is_multiple_page_parent_yes"><?php _e('Set post parent', 'wp_all_import_plugin') ?></label>
|
||||
<div class="switcher-target-is_multiple_page_parent_yes">
|
||||
<div class="input">
|
||||
<input type="text" class="" name="parent" value="<?php echo esc_attr($post['parent']) ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input fleft" style="position:relative;width:220px; margin-top: 5px;">
|
||||
<input type="radio" id="is_multiple_page_parent_no" class="switcher" name="is_multiple_page_parent" value="no" <?php echo 'no' == $post['is_multiple_page_parent'] ? 'checked="checked"': '' ?> style="margin-left:0;"/>
|
||||
<label for="is_multiple_page_parent_no"><?php _e('Set with XPath', 'wp_all_import_plugin' )?></label> <br>
|
||||
<div class="switcher-target-is_multiple_page_parent_no">
|
||||
<div class="input">
|
||||
<input type="text" class="smaller-text" name="single_page_parent" style="width:190px;" value="<?php echo esc_attr($post['single_page_parent']) ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<h4><?php _e('Menu Order', 'wp_all_import_plugin') ?></h4>
|
||||
<div class="input">
|
||||
<input type="text" class="" name="order" value="<?php echo esc_attr($post['order']) ?>" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ( ! empty($post['deligate']) and $post['deligate'] == 'wpallexport' ): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<h4><?php _e('Dynamic Post Type', 'wp_all_import_plugin') ?></h4>
|
||||
<div class="input">
|
||||
<div style="margin: 11px; float: left;">
|
||||
<input type="hidden" name="is_override_post_type" value="0"/>
|
||||
<input type="checkbox" value="1" class="switcher-horizontal fix_checkbox" name="is_override_post_type" id="is_override_post_type" <?php echo ( ! empty($post['is_override_post_type'])) ? 'checked="checked"' : '' ?>>
|
||||
<label for="is_override_post_type"><?php _e('Slug','wp_all_import_plugin');?></label>
|
||||
</div>
|
||||
<div class="switcher-target-is_override_post_type" style="float: left; overflow: hidden;">
|
||||
<input type="text" name="post_type_xpath" style="vertical-align:middle; line-height: 26px;" value="<?php echo esc_attr($post['post_type_xpath']) ?>" />
|
||||
</div>
|
||||
<a href="#help" class="wpallimport-help" title="<?php _e('If records in this import have different post types specify the slug of the desired post type here.
|
||||
', 'wp_all_import_plugin') ?>" style="position:relative; top:12px;">?</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,358 @@
|
||||
<?php
|
||||
|
||||
$custom_type = get_post_type_object( $post_type );
|
||||
|
||||
$exclude_taxonomies = apply_filters('pmxi_exclude_taxonomies', (class_exists('PMWI_Plugin')) ? array('post_format', 'product_type', 'product_shipping_class') : array('post_format'));
|
||||
$post_taxonomies = array_diff_key(get_taxonomies_by_object_type($post['is_override_post_type'] ? array_keys(get_post_types( '', 'names' )) : array($post_type), 'object'), array_flip($exclude_taxonomies));
|
||||
|
||||
if ( ! empty($post_taxonomies)):
|
||||
?>
|
||||
<div class="wpallimport-collapsed closed wpallimport-section">
|
||||
<div class="wpallimport-content-section">
|
||||
<div class="wpallimport-collapsed-header">
|
||||
<h3><?php _e('Taxonomies, Categories, Tags','wp_all_import_plugin');?></h3>
|
||||
</div>
|
||||
<div class="wpallimport-collapsed-content" style="padding: 0;">
|
||||
<div class="wpallimport-collapsed-content-inner" style="padding-bottom:0;">
|
||||
<input type="button" rel="taxonomies_hints" value="<?php _e('Show Hints', 'wp_all_import_plugin');?>" class="show_hints">
|
||||
<table class="form-table" style="max-width:none;">
|
||||
|
||||
<?php $private_ctx = 0; ?>
|
||||
<tr>
|
||||
<td colspan="3" style="padding-bottom:20px;">
|
||||
<?php foreach ($post_taxonomies as $ctx): if ("" == $ctx->labels->name or (class_exists('PMWI_Plugin') and strpos($ctx->name, "pa_") === 0 and $post_type == "product")) continue;?>
|
||||
<?php if (! $ctx->show_ui ) $private_ctx++; ?>
|
||||
<table style="width:100%;">
|
||||
<tr class="<?php echo ( ! $ctx->show_ui) ? 'private_ctx' : ''; ?>">
|
||||
<td>
|
||||
<div class="post_taxonomy">
|
||||
<div class="input">
|
||||
<input type="hidden" name="tax_assing[<?php echo esc_attr($ctx->name);?>]" value="0"/>
|
||||
<input type="checkbox" class="assign_post switcher" name="tax_assing[<?php echo esc_attr($ctx->name);?>]" id="tax_assing_<?php echo esc_attr($ctx->name);?>" <?php echo ( ! empty($post['tax_assing'][$ctx->name]) ) ? 'checked="checked"' : ''; ?> value="1"/>
|
||||
<label for="tax_assing_<?php echo esc_attr($ctx->name);?>"><?php echo esc_html($ctx->labels->name); ?></label>
|
||||
</div>
|
||||
<div class="switcher-target-tax_assing_<?php echo esc_attr($ctx->name);?>">
|
||||
<div class="input sub_input">
|
||||
<div class="input">
|
||||
<input type="radio" name="tax_logic[<?php echo esc_attr($ctx->name);?>]" value="single" id="tax_logic_single_<?php echo esc_attr($ctx->name);?>" class="switcher" <?php echo (empty($post['tax_logic'][$ctx->name]) or $post['tax_logic'][$ctx->name] == 'single') ? 'checked="checked"' : ''; ?>/>
|
||||
<label for="tax_logic_single_<?php echo esc_attr($ctx->name);?>"><?php printf(__('Each %s has just one %s', 'wp_all_import_plugin'), esc_attr($custom_type->labels->singular_name), esc_attr($ctx->labels->singular_name)); ?></label>
|
||||
<div class="switcher-target-tax_logic_single_<?php echo esc_attr($ctx->name);?> sub_input">
|
||||
<input type="hidden" name="term_assing[<?php echo esc_attr($ctx->name);?>]" value="0"/>
|
||||
<input type="checkbox" name="term_assing[<?php echo esc_attr($ctx->name);?>]" <?php echo (isset($post['term_assing'][$ctx->name])) ? (( ! empty($post['term_assing'][$ctx->name]) ) ? 'checked="checked"' : '') : 'checked="checked"'; ?> title="<?php _e('Assign post to the taxonomy.','wp_all_import_plugin');?>" value="1"/>
|
||||
<input type="text" class="widefat single_xpath_field" name="tax_single_xpath[<?php echo esc_attr($ctx->name); ?>]" value="<?php echo ( isset($post['tax_single_xpath'][$ctx->name])) ? esc_textarea($post['tax_single_xpath'][$ctx->name]) : ''; ?>" style="width:50%;"/>
|
||||
<div class="input tax_is_full_search_single" style="margin: 10px 0;">
|
||||
<input type="hidden" name="tax_is_full_search_single[<?php echo esc_attr($ctx->name); ?>]" value="0"/>
|
||||
<input type="checkbox" id="tax_is_full_search_single_<?php echo esc_attr($ctx->name); ?>" class="switcher" <?php if ( ! empty($post['tax_is_full_search_single'][$ctx->name]) ) echo "checked='checked'"; ?> name="tax_is_full_search_single[<?php echo esc_attr($ctx->name); ?>]" value="1"/>
|
||||
<label for="tax_is_full_search_single_<?php echo esc_attr($ctx->name);?>"><?php printf(__('Try to match terms to existing child %s', 'wp_all_import_plugin'), esc_attr($ctx->labels->name)); ?></label>
|
||||
<div class="switcher-target-tax_is_full_search_single_<?php echo esc_attr($ctx->name); ?> sub_input">
|
||||
<div class="input tax_assign_to_one_term_single" style="margin: 10px 0;">
|
||||
<input type="hidden" name="tax_assign_to_one_term_single[<?php echo esc_attr($ctx->name); ?>]" value="0"/>
|
||||
<input type="checkbox" id="tax_assign_to_one_term_single_<?php echo esc_attr($ctx->name); ?>" <?php if ( ! empty($post['tax_assign_to_one_term_single'][$ctx->name]) ) echo "checked='checked'"; ?> name="tax_assign_to_one_term_single[<?php echo esc_attr($ctx->name); ?>]" value="1"/>
|
||||
<label for="tax_assign_to_one_term_single_<?php echo esc_attr($ctx->name);?>"><?php printf(__('Only assign %s to the imported %s, not the entire hierarchy', 'wp_all_import_plugin'), esc_attr($custom_type->labels->name), esc_attr($ctx->labels->singular_name)); ?></label>
|
||||
<a href="#help" class="wpallimport-help" title="<?php _e('By default all categories above the matched category will also be assigned to the post. If enabled, only the imported category will be assigned to the post.', 'wp_all_import_plugin'); ?>" style="position:relative; top: -1px;">?</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="radio" name="tax_logic[<?php echo esc_attr($ctx->name);?>]" value="multiple" id="tax_logic_multiple_<?php echo esc_attr($ctx->name);?>" class="switcher" <?php echo (!empty($post['tax_logic'][$ctx->name]) and $post['tax_logic'][$ctx->name] == 'multiple') ? 'checked="checked"' : ''; ?>/>
|
||||
<label for="tax_logic_multiple_<?php echo esc_attr($ctx->name);?>"><?php printf(__('Each %s has multiple %s', 'wp_all_import_plugin'), esc_attr($custom_type->labels->singular_name), esc_attr($ctx->labels->name)); ?></label>
|
||||
<div class="switcher-target-tax_logic_multiple_<?php echo esc_attr($ctx->name);?> sub_input">
|
||||
<input type="hidden" name="multiple_term_assing[<?php echo esc_attr($ctx->name);?>]" value="1"/>
|
||||
<input type="text" class="widefat multiple_xpath_field" name="tax_multiple_xpath[<?php echo esc_attr($ctx->name); ?>]" value="<?php echo ( ! empty($post['tax_multiple_xpath'][$ctx->name])) ? esc_textarea($post['tax_multiple_xpath'][$ctx->name]) : ''; ?>" style="width:50%;"/>
|
||||
<label><?php _e('Separated by', 'wp_all_import_plugin'); ?></label>
|
||||
<input type="text" class="small tax_delim" name="tax_multiple_delim[<?php echo esc_attr($ctx->name); ?>]" value="<?php echo esc_attr(( ! empty($post['tax_multiple_delim'][$ctx->name]) ) ? str_replace("&","&", htmlentities(htmlentities($post['tax_multiple_delim'][$ctx->name]))) : ','); ?>" />
|
||||
<div class="input tax_is_full_search_multiple" style="margin: 10px 0;">
|
||||
<input type="hidden" name="tax_is_full_search_multiple[<?php echo esc_attr($ctx->name); ?>]" value="0"/>
|
||||
<input type="checkbox" id="tax_is_full_search_multiple_<?php echo esc_attr($ctx->name); ?>" class="switcher" <?php if ( ! empty($post['tax_is_full_search_multiple'][$ctx->name]) ) echo "checked='checked'"; ?> name="tax_is_full_search_multiple[<?php echo esc_attr($ctx->name); ?>]" value="1"/>
|
||||
<label for="tax_is_full_search_multiple_<?php echo esc_attr($ctx->name);?>"><?php printf(__('Try to match terms to existing child %s', 'wp_all_import_plugin'), esc_attr($ctx->labels->name)); ?></label>
|
||||
<div class="switcher-target-tax_is_full_search_multiple_<?php echo esc_attr($ctx->name); ?> sub_input">
|
||||
<div class="input tax_assign_to_one_term_multiple" style="margin: 10px 0;">
|
||||
<input type="hidden" name="tax_assign_to_one_term_multiple[<?php echo esc_attr($ctx->name); ?>]" value="0"/>
|
||||
<input type="checkbox" id="tax_assign_to_one_term_multiple_<?php echo esc_attr($ctx->name); ?>" <?php if ( ! empty($post['tax_assign_to_one_term_multiple'][$ctx->name]) ) echo "checked='checked'"; ?> name="tax_assign_to_one_term_multiple[<?php echo esc_attr($ctx->name); ?>]" value="1"/>
|
||||
<label for="tax_assign_to_one_term_multiple_<?php echo esc_attr($ctx->name);?>"><?php printf(__('Only assign %s to the imported %s, not the entire hierarchy', 'wp_all_import_plugin'), esc_attr($custom_type->labels->name), esc_attr($ctx->labels->singular_name)); ?></label>
|
||||
<a href="#help" class="wpallimport-help" title="<?php _e('By default all categories above the matched category will also be assigned to the post. If enabled, only the imported category will be assigned to the post.', 'wp_all_import_plugin'); ?>" style="position:relative; top: -1px;">?</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($ctx->hierarchical): ?>
|
||||
<div class="input">
|
||||
<input type="radio" name="tax_logic[<?php echo esc_attr($ctx->name);?>]" value="hierarchical" id="tax_logic_hierarchical_<?php echo esc_attr($ctx->name);?>" class="switcher" <?php echo (!empty($post['tax_logic'][$ctx->name]) and $post['tax_logic'][$ctx->name] == 'hierarchical') ? 'checked="checked"' : ''; ?>/>
|
||||
<label for="tax_logic_hierarchical_<?php echo esc_attr($ctx->name);?>"><?php printf(__('%ss have hierarchical (parent/child) %s (i.e. Sports > Golf > Clubs > Putters)', 'wp_all_import_plugin'), esc_attr($custom_type->labels->singular_name), esc_attr($ctx->labels->name)); ?></label>
|
||||
<div class="switcher-target-tax_logic_hierarchical_<?php echo esc_attr($ctx->name);?> sub_input">
|
||||
<div class="input">
|
||||
<input type="hidden" name="tax_hierarchical_logic_entire[<?php echo esc_attr($ctx->name);?>]" value="0" />
|
||||
<input type="checkbox" name="tax_hierarchical_logic_entire[<?php echo esc_attr($ctx->name);?>]" value="1" id="hierarchical_logic_entire_<?php echo esc_attr($ctx->name);?>" class="switcher" <?php echo (!empty($post['tax_hierarchical_logic_entire'][$ctx->name])) ? 'checked="checked"' : ''; ?>/>
|
||||
<label for="hierarchical_logic_entire_<?php echo esc_attr($ctx->name);?>"><?php _e('An element in my file contains the entire hierarchy (i.e. you have an element with a value = Sports > Golf > Clubs > Putters)', 'wp_all_import_plugin'); ?></label>
|
||||
<div class="switcher-target-hierarchical_logic_entire_<?php echo esc_attr($ctx->name);?> sub_input" style="margin-left: 20px; padding-left: 20px;">
|
||||
<ul class="tax_hierarchical_logic no-margin">
|
||||
<?php $txes_count = 0; if ( ! empty($post['tax_hierarchical_xpath'][$ctx->name])): foreach ($post['tax_hierarchical_xpath'][$ctx->name] as $k => $path) : if (empty($path)) continue; ?>
|
||||
<li class="dragging">
|
||||
<div style="position:relative;">
|
||||
<input type="hidden" class="assign_term" name="tax_hierarchical_assing[<?php echo esc_attr($ctx->name);?>][<?php echo esc_attr($k);?>]" value="1"/>
|
||||
<input type="text" class="widefat hierarchical_xpath_field" name="tax_hierarchical_xpath[<?php echo esc_attr($ctx->name); ?>][]" value="<?php echo esc_textarea(wp_all_import_filter_html_kses($path)); ?>"/>
|
||||
<a href="javascript:void(0);" class="icon-item remove-ico"></a>
|
||||
</div>
|
||||
</li>
|
||||
<?php $txes_count++; endforeach; endif; ?>
|
||||
<?php if ( ! $txes_count): ?>
|
||||
<li class="dragging">
|
||||
<div style="position:relative;">
|
||||
<input type="hidden" class="assign_term" name="tax_hierarchical_assing[<?php echo esc_attr($ctx->name);?>][0]" value="1"/>
|
||||
<input type="text" class="widefat hierarchical_xpath_field" name="tax_hierarchical_xpath[<?php echo esc_attr($ctx->name); ?>][]" value=""/>
|
||||
<a href="javascript:void(0);" class="icon-item remove-ico"></a>
|
||||
</div>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<li class="dragging template">
|
||||
<div style="position:relative;">
|
||||
<input type="hidden" class="assign_term" name="tax_hierarchical_assing[<?php echo esc_attr($ctx->name);?>][NUMBER]" value="1"/>
|
||||
<input type="text" class="widefat hierarchical_xpath_field" name="tax_hierarchical_xpath[<?php echo esc_attr($ctx->name); ?>][]" value=""/>
|
||||
<a href="javascript:void(0);" class="icon-item remove-ico"></a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<label><?php _e('Separated by', 'wp_all_import_plugin'); ?></label>
|
||||
<input type="text" class="small tax_delim" name="tax_hierarchical_delim[<?php echo esc_attr($ctx->name); ?>]" value="<?php echo ( ! empty($post['tax_hierarchical_delim'][$ctx->name]) ) ? str_replace("&","&", htmlentities(htmlentities($post['tax_hierarchical_delim'][$ctx->name]))) : '>' ?>" />
|
||||
<div class="input">
|
||||
<input type="hidden" name="tax_hierarchical_last_level_assign[<?php echo esc_attr($ctx->name); ?>]" value="0" />
|
||||
<input type="checkbox" id="tax_hierarchical_last_level_assign_<?php echo esc_attr($ctx->name); ?>" name="tax_hierarchical_last_level_assign[<?php echo esc_attr($ctx->name); ?>]" value="1" <?php echo ( ! empty($post['tax_hierarchical_last_level_assign'][$ctx->name])) ? 'checked="checked"': '' ?> />
|
||||
<label for="tax_hierarchical_last_level_assign_<?php echo esc_attr($ctx->name); ?>"><?php printf(__('Only assign %s to the bottom level term in the hierarchy', 'wp_all_import_plugin'), esc_attr($custom_type->label)); ?></label>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="hidden" name="is_tax_hierarchical_group_delim[<?php echo esc_attr($ctx->name); ?>]" value="0" />
|
||||
<input type="checkbox" id="is_tax_hierarchical_group_delim_<?php echo esc_attr($ctx->name); ?>" name="is_tax_hierarchical_group_delim[<?php echo esc_attr($ctx->name); ?>]" value="1" class="switcher" <?php echo ( ! empty($post['is_tax_hierarchical_group_delim'][$ctx->name])) ? 'checked="checked"': '' ?> />
|
||||
<label for="is_tax_hierarchical_group_delim_<?php echo esc_attr($ctx->name); ?>"><?php printf(__('Separate hierarchy groups via symbol', 'wp_all_import_plugin'), esc_attr($custom_type->label)) ?></label>
|
||||
<div class="switcher-target-is_tax_hierarchical_group_delim_<?php echo esc_attr($ctx->name);?> sub_input">
|
||||
<label><?php _e('Separated by', 'wp_all_import_plugin'); ?></label>
|
||||
<input type="text" class="small tax_delim" name="tax_hierarchical_group_delim[<?php echo esc_attr($ctx->name); ?>]" value="<?php echo esc_attr(( ! empty($post['tax_hierarchical_group_delim'][$ctx->name]) ) ? str_replace("&","&", htmlentities(htmlentities($post['tax_hierarchical_group_delim'][$ctx->name]))) : '|'); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<a class="preview_taxonomies" href="javascript:void(0);" style="top:-35px; float: right; position: relative;" rel="preview_taxonomies"><?php _e('Preview', 'wp_all_import_plugin'); ?></a>
|
||||
<div class="input">
|
||||
<a href="javascript:void(0);" class="icon-item add-new-cat" style="width: 200px;"><?php _e('Add Another Hierarchy Group','wp_all_import_plugin');?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="hidden" name="tax_hierarchical_logic_manual[<?php echo esc_attr($ctx->name);?>]" value="0" />
|
||||
<input type="checkbox" name="tax_hierarchical_logic_manual[<?php echo esc_attr($ctx->name);?>]" value="1" id="hierarchical_logic_manual_<?php echo esc_attr($ctx->name);?>" class="switcher" <?php echo (!empty($post['tax_hierarchical_logic_manual'][$ctx->name])) ? 'checked="checked"' : ''; ?>/>
|
||||
<label for="hierarchical_logic_manual_<?php echo esc_attr($ctx->name);?>"><?php _e('Manually design the hierarchy with drag & drop', 'wp_all_import_plugin'); ?></label>
|
||||
<div class="switcher-target-hierarchical_logic_manual_<?php echo esc_attr($ctx->name);?> sub_input">
|
||||
<p style="margin-bottom: 10px;"><?php printf(__('Drag the <img src="%s" class="wpallimport-drag-icon"/> to the right to create a child, drag up and down to re-order.'), esc_url(WP_ALL_IMPORT_ROOT_URL . '/static/img/drag.png')); ?></p>
|
||||
<ol class="sortable no-margin" style="margin-left: 20px;">
|
||||
<?php
|
||||
if ( ! empty($post['post_taxonomies'][$ctx->name]) ):
|
||||
|
||||
$taxonomies_hierarchy = json_decode($post['post_taxonomies'][$ctx->name]);
|
||||
|
||||
if (!empty($taxonomies_hierarchy) and is_array($taxonomies_hierarchy)): $i = 0;
|
||||
|
||||
foreach ($taxonomies_hierarchy as $cat) { $i++;
|
||||
if (is_null($cat->parent_id) or empty($cat->parent_id))
|
||||
{
|
||||
?>
|
||||
<li id="item_<?php echo esc_attr($i); ?>" class="dragging">
|
||||
<div class="drag-element">
|
||||
<input type="hidden" class="assign_term" value="1"/>
|
||||
<input type="text" class="widefat xpath_field" value="<?php echo esc_textarea($cat->xpath); ?>"/>
|
||||
|
||||
<?php do_action('pmxi_category_view', $cat, $i, $ctx->name, $post_type); ?>
|
||||
|
||||
</div>
|
||||
<?php if ($i>1):?><a href="javascript:void(0);" class="icon-item remove-ico"></a><?php endif;?>
|
||||
<?php echo reverse_taxonomies_html($taxonomies_hierarchy, $cat->item_id, $i, $ctx->name, $post_type); ?>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
endif;
|
||||
else:
|
||||
?>
|
||||
<li id="item_1" class="dragging">
|
||||
<div class="drag-element">
|
||||
<input type="hidden" class="assign_term" value="1"/>
|
||||
<input type="text" class="widefat xpath_field" value=""/>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="icon-item remove-ico"></a>
|
||||
<ol>
|
||||
<li id="item_2" class="dragging">
|
||||
<div class="drag-element">
|
||||
<input type="hidden" class="assign_term" value="1"/>
|
||||
<input class="widefat xpath_field" type="text" value=""/>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="icon-item remove-ico"></a>
|
||||
</li>
|
||||
</ol>
|
||||
</li>
|
||||
<?php
|
||||
endif;?>
|
||||
|
||||
<li id="item" class="template">
|
||||
<div class="drag-element">
|
||||
<input type="hidden" class="assign_term" value="1"/>
|
||||
<input type="text" class="widefat xpath_field" value=""/>
|
||||
<?php do_action('pmxi_category_view', false, false, $ctx->name, $post_type); ?>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="icon-item remove-ico"></a>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
<input type="hidden" class="hierarhy-output" name="post_taxonomies[<?php echo esc_attr($ctx->name); ?>]" value="<?php echo empty($post['post_taxonomies'][$ctx->name]) ? '' : esc_attr($post['post_taxonomies'][$ctx->name]) ?>"/>
|
||||
<?php do_action('pmxi_category_options_view', ((!empty($post['post_taxonomies'][$ctx->name])) ? $post['post_taxonomies'][$ctx->name] : false), $ctx->name, $post_type, $ctx->labels->name); ?>
|
||||
<div class="input" style="margin-left:17px;">
|
||||
<label><?php _e('Separated by', 'wp_all_import_plugin'); ?></label>
|
||||
<input type="text" class="small tax_delim" name="tax_manualhierarchy_delim[<?php echo esc_attr($ctx->name); ?>]" value="<?php echo esc_attr(( ! empty($post['tax_manualhierarchy_delim'][$ctx->name]) ) ? str_replace("&","&", htmlentities(htmlentities($post['tax_manualhierarchy_delim'][$ctx->name]))) : ','); ?>" />
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="icon-item add-new-ico"><?php _e('Add Another Row','wp_all_import_plugin');?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="input" style="margin: 4px;">
|
||||
<?php
|
||||
$tax_mapping = ( ! empty($post['tax_mapping'][$ctx->name]) ) ? json_decode($post['tax_mapping'][$ctx->name], true) : false;
|
||||
?>
|
||||
<input type="hidden" name="tax_enable_mapping[<?php echo esc_attr($ctx->name); ?>]" value="0"/>
|
||||
<input type="checkbox" id="tax_mapping_<?php echo esc_attr($ctx->name); ?>" class="pmxi_tax_mapping switcher" <?php if ( ! empty($post['tax_enable_mapping'][$ctx->name]) ) echo "checked='checked'"; ?> name="tax_enable_mapping[<?php echo esc_attr($ctx->name); ?>]" value="1"/>
|
||||
<label for="tax_mapping_<?php echo esc_attr($ctx->name);?>"><?php printf(__('Enable Mapping for %s', 'wp_all_import_plugin'), esc_attr($ctx->labels->name)); ?></label>
|
||||
<div class="switcher-target-tax_mapping_<?php echo esc_attr($ctx->name);?> sub_input custom_type" rel="tax_mapping">
|
||||
<fieldset style="padding: 0;">
|
||||
<table cellpadding="0" cellspacing="5" class="tax-form-table" rel="tax_mapping_<?php echo esc_attr($ctx->name); ?>" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?php _e('In Your File', 'wp_all_import_plugin') ?></td>
|
||||
<td><?php _e('Translated To', 'wp_all_import_plugin') ?></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if ( ! empty($tax_mapping) and is_array($tax_mapping) ){
|
||||
|
||||
foreach ($tax_mapping as $key => $value) {
|
||||
|
||||
$k = $key;
|
||||
|
||||
if (is_array($value)){
|
||||
$keys = array_keys($value);
|
||||
$k = $keys[0];
|
||||
}
|
||||
|
||||
?>
|
||||
<tr class="form-field">
|
||||
<td>
|
||||
<input type="text" class="mapping_from widefat" value="<?php echo esc_textarea($k); ?>">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="mapping_to widefat" value="<?php echo esc_textarea((is_array($value)) ? $value[$k] : $value); ?>">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px; top: 7px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
?>
|
||||
<tr class="form-field">
|
||||
<td>
|
||||
<input type="text" class="mapping_from widefat">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="mapping_to widefat">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px; top: 7px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<tr class="form-field template">
|
||||
<td>
|
||||
<input type="text" class="mapping_from widefat">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="mapping_to widefat">
|
||||
</td>
|
||||
<td class="action remove">
|
||||
<a href="#remove" style="right:-10px; top: 7px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<a href="javascript:void(0);" title="<?php _e('Add Another Rule', 'wp_all_import_plugin')?>" class="action add-new-key add-new-entry"><?php _e('Add Another Rule', 'wp_all_import_plugin') ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="tax_mapping[<?php echo esc_attr($ctx->name); ?>]" value="<?php if (!empty($post['tax_mapping'][$ctx->name])) echo esc_html($post['tax_mapping'][$ctx->name]); ?>"/>
|
||||
</fieldset>
|
||||
<div class="input">
|
||||
<input type="hidden" name="tax_logic_mapping[<?php echo esc_attr($ctx->name); ?>]" value="0"/>
|
||||
<input type="checkbox" id="tax_logic_mapping_<?php echo esc_attr($ctx->name); ?>" name="tax_logic_mapping[<?php echo esc_attr($ctx->name); ?>]" <?php echo ( ! empty($post['tax_logic_mapping'][$ctx->name]) ) ? 'checked="checked"' : ''; ?> value="1"/>
|
||||
<label for="tax_logic_mapping_<?php echo esc_attr($ctx->name); ?>"><?php _e('Apply mapping rules before splitting via separator symbol','wp_all_import_plugin'); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="wpallimport-collapsed closed wpallimport-section">
|
||||
<div class="wpallimport-content-section rad0" style="margin:0; border-top:1px solid #ddd; border-bottom: none; border-right: none; border-left: none; background: #f1f2f2; position:relative; bottom:-15px;">
|
||||
<div class="wpallimport-collapsed-header">
|
||||
<h3 style="color:#40acad;"><?php _e('Advanced Options','wp_all_import_plugin');?></h3>
|
||||
</div>
|
||||
<div class="wpallimport-collapsed-content" style="padding: 0;">
|
||||
<div class="wpallimport-collapsed-content-inner">
|
||||
<hr>
|
||||
<table class="form-table" style="max-width:none;margin-top:1.5em;">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="input">
|
||||
<input type="hidden" name="do_not_create_terms" value="0"/>
|
||||
<input type="checkbox" id="do_not_create_terms" name="do_not_create_terms" value="1" class="assign_post switcher" <?php echo !empty($post['do_not_create_terms']) ? 'checked="checked"': '' ?> />
|
||||
<label for="do_not_create_terms"><?php _e('Do not create new terms', 'wp_all_import_plugin'); ?></label><a href="#help" class="wpallimport-help" style="position: relative; top: -2px;" title="<?php _e('When this box is checked WP All Import will not create any terms and will only match existing terms on your site.</b>', 'wp_all_import_plugin') ?>">?</a>
|
||||
</div>
|
||||
<?php if ($private_ctx): ?>
|
||||
<div class="input">
|
||||
<input type="checkbox" id="show_hidden_ctx"/>
|
||||
<label for="show_hidden_ctx"><?php _e('Show "private" taxonomies', 'wp_all_import_plugin'); ?></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="taxonomies_hints" style="display:none;">
|
||||
<ul>
|
||||
<li><?php _e('Taxonomies that don\'t already exist on your site will be created unless the \'Do not create new terms\' option is checked.', 'wp_all_import_plugin'); ?></li>
|
||||
<li><?php _e('To import to existing parent taxonomies, use the existing taxonomy name or slug.', 'wp_all_import_plugin'); ?></li>
|
||||
<li><?php _e('To import to existing hierarchical taxonomies, create the entire hierarchy using the taxonomy names or slugs.', 'wp_all_import_plugin'); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user