PluginProbe ʕ •ᴥ•ʔ
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel / 1.3.6
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel v1.3.6
trunk 0.9.0 0.9.1 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0 1.2.1 1.2.10 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.14 1.4.15 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0
wp-all-export / views / admin / export / template.php
wp-all-export / views / admin / export Last commit date
blocks 4 years ago options 4 years ago template 4 years ago google.php 4 years ago index.php 4 years ago options.php 4 years ago process.php 4 years ago success_page.php 4 years ago template.php 4 years ago variation_options.php 4 years ago variation_options_common.php 4 years ago
template.php
649 lines
1 <?php
2 if(!defined('ABSPATH')) {
3 die();
4 }
5
6 ?>
7 <h2 class="wpallexport-wp-notices"></h2>
8 <div class="wpallexport-wrapper">
9 <div class="wpallexport-header">
10 <div class="wpallexport-logo"></div>
11 <div class="wpallexport-title">
12 <h2><?php esc_html_e('Drag & Drop', 'wp_all_export_plugin'); ?></h2>
13 </div>
14 <div class="wpallexport-links">
15 <a href="http://www.wpallimport.com/support/?utm_source=export-plugin-free&utm_medium=help&utm_campaign=premium-support"
16 target="_blank"><?php esc_html_e('Support', 'wp_all_export_plugin'); ?></a> |
17 <a
18 href="http://www.wpallimport.com/documentation/?utm_source=export-plugin-free&utm_medium=help&utm_campaign=docs"
19 target="_blank"><?php esc_html_e('Documentation', 'wp_all_export_plugin'); ?></a>
20 </div>
21 </div>
22 <div class="clear"></div>
23 </div>
24
25 <div class="clear"></div>
26
27 <div class="wpallexport-content-section wpallexport-console" style="display: block; margin-bottom: 10px;">
28 <div class="ajax-console">
29 <div class="founded_records">
30 <div class="wp_all_export_preloader"></div>
31 <h4><?php esc_html_e("Drag & drop data to include in the export file."); ?></h4>
32 </div>
33 </div>
34 </div>
35
36 <?php \Wpae\Pro\Filtering\FilteringFactory::render_filtering_block( $engine, $this->isWizard, $post, true ); ?>
37
38 <table class="wpallexport-layout wpallexport-export-template">
39 <tr>
40 <td class="left">
41
42 <?php do_action('pmxe_template_header', $this->isWizard, $post); ?>
43
44 <?php if ($this->errors->get_error_codes()): ?>
45 <?php $this->error(); ?>
46 <?php endif ?>
47
48 <form class="wpallexport-template <?php echo ! $this->isWizard ? 'edit' : '' ?> wpallexport-step-3" method="post" style="display:none;" id="templateForm">
49
50 <input type="hidden" class="hierarhy-output" name="filter_rules_hierarhy" value="<?php echo esc_attr($post['filter_rules_hierarhy']);?>"/>
51 <input type="hidden" name="taxonomy_to_export" value="<?php echo esc_attr($post['taxonomy_to_export']);?>">
52 <input type="hidden" name="export_only_modified_stuff" value="<?php echo esc_attr($post['export_only_modified_stuff']) ;?>" />
53 <input type="hidden" name="export_only_new_stuff" value="<?php echo esc_attr($post['export_only_new_stuff']);?>" />
54 <input type="hidden" name="sub_post_type_to_export" value="<?php echo esc_attr($post['sub_post_type_to_export']);?>">
55
56 <?php
57 $addons = new \Wpae\App\Service\Addons\AddonService();
58 $selected_post_type = '';
59 if ($addons->isUserAddonActive() && XmlExportUser::$is_active):
60 $selected_post_type = empty($post['cpt'][0]) ? 'users' : $post['cpt'][0];
61 endif;
62 if (XmlExportComment::$is_active):
63 $selected_post_type = 'comments';
64 endif;
65 if (empty($selected_post_type) and ! empty($post['cpt'][0]))
66 {
67 $selected_post_type = $post['cpt'][0];
68 }
69 ?>
70
71 <input type="hidden" name="selected_post_type" value="<?php echo esc_attr($selected_post_type); ?>"/>
72 <input type="hidden" name="export_type" value="<?php echo esc_attr($post['export_type']); ?>"/>
73 <div class="wpallexport-collapsed wpallexport-section wpallexport-simple-xml-template">
74 <div class="wpallexport-content-section" style="margin-bottom: 10px;">
75 <div class="wpallexport-collapsed-content">
76 <fieldset class="optionsset" style="padding: 10px 20px 0px;">
77 <div id="columns_to_export">
78 <div class="columns-to-export-content" style="padding-right: 8px;">
79 <ol id="columns" class="rad4" style="margin-bottom:0;">
80 <?php
81 $i = 0;
82 $new_export = false;
83 if ( ! empty($post['ids']) )
84 {
85 foreach ($post['ids'] as $ID => $value)
86 {
87 if (is_numeric($ID)){ if (empty($post['cc_name'][$ID])) continue;
88 ?>
89 <li>
90 <div class="custom_column" rel="<?php echo intval(($i + 1));?>">
91 <?php
92 $field_label = (!empty($post['cc_name'][$ID])) ? $post['cc_name'][$ID] : $post['cc_label'][$ID];
93 $field_name = (!empty($post['cc_name'][$ID])) ? $post['cc_name'][$ID] : trim(str_replace(" ", "_", $post['cc_label'][$ID]));
94 $field_type = $post['cc_type'][$ID];
95 $field_options = esc_html($post['cc_options'][$ID]);
96 ?>
97 <label class="wpallexport-xml-element"><?php echo (strtolower($field_label) == "id") ? "ID" : esc_html($field_label); ?></label>
98 <input type="hidden" name="ids[]" value="1"/>
99 <input type="hidden" name="cc_label[]" value="<?php echo (!empty($post['cc_label'][$ID])) ? esc_attr($post['cc_label'][$ID]) : ''; ?>"/>
100 <input type="hidden" name="cc_php[]" value="<?php echo (!empty($post['cc_php'][$ID])) ? esc_attr($post['cc_php'][$ID]) : 0; ?>"/>
101 <input type="hidden" name="cc_code[]" value="<?php echo (!empty($post['cc_code'][$ID])) ? esc_attr($post['cc_code'][$ID]) : ''; ?>"/>
102 <input type="hidden" name="cc_sql[]" value="<?php echo (!empty($post['cc_sql'][$ID])) ? esc_attr($post['cc_sql'][$ID]) : 0; ?>"/>
103 <input type="hidden" name="cc_type[]" value="<?php echo esc_attr($field_type); ?>"/>
104 <input type="hidden" name="cc_options[]" value="<?php echo (!empty($field_options)) ? esc_attr($field_options) : 0; ?>"/>
105 <input type="hidden" name="cc_value[]" value="<?php echo esc_attr($post['cc_value'][$ID]); ?>"/>
106 <input type="hidden" name="cc_name[]" value="<?php echo XmlExportEngine::sanitizeFieldName(esc_attr($field_name)); ?>"/>
107 <input type="hidden" name="cc_settings[]" value="<?php echo (!empty($post['cc_settings'][$ID])) ? esc_attr($post['cc_settings'][$ID]) : 0; ?>"/>
108 </div>
109 </li>
110 <?php
111 $i++;
112 }
113 }
114 }
115 elseif ($this->isWizard)
116 {
117 $new_export = true;
118 if ( empty($post['cpt']) and $addons->isWooCommerceAddonActive() and ! XmlExportWooCommerceOrder::$is_active and ($addons->isUserAddonActive() and ! XmlExportUser::$is_active) and ! XmlExportComment::$is_active ){
119 $init_fields[] =
120 array(
121 'label' => 'post_type',
122 'name' => 'post_type',
123 'type' => 'post_type'
124 );
125 }
126 foreach ($init_fields as $k => $field) {
127 ?>
128 <li>
129 <div class="custom_column" rel="<?php echo intval(($i + 1));?>">
130 <label class="wpallexport-xml-element"><?php echo XmlExportEngine::sanitizeFieldName(esc_html($field['name'])); ?></label>
131 <input type="hidden" name="ids[]" value="1"/>
132 <input type="hidden" name="cc_label[]" value="<?php echo esc_attr($field['label']); ?>"/>
133 <input type="hidden" name="cc_php[]" value="0"/>
134 <input type="hidden" name="cc_code[]" value=""/>
135 <input type="hidden" name="cc_sql[]" value="0"/>
136 <input type="hidden" name="cc_options[]" value="<?php echo (empty($field['options'])) ? 0 : esc_attr($field['options']); ?>"/>
137 <input type="hidden" name="cc_type[]" value="<?php echo esc_attr($field['type']); ?>"/>
138 <input type="hidden" name="cc_value[]" value="<?php echo esc_attr($field['label']); ?>"/>
139 <input type="hidden" name="cc_name[]" value="<?php echo (strtoupper($field['name']) == 'ID') ? 'id' : esc_attr($field['name']);?>"/>
140 <input type="hidden" name="cc_settings[]" value="0"/>
141 </div>
142 </li>
143 <?php
144 $i++;
145 }
146 }
147 ?>
148 <li class="placeholder" <?php if ( ! empty($post['ids']) and count($post['ids']) > 1 or $new_export) echo 'style="display:none;"'; ?>><?php esc_html_e("Drag & drop data from \"Available Data\" on the right to include it in the export or click \"Add Field To Export\" below.", "wp_all_export_plugin"); ?></li>
149 <?php
150 ?>
151 </ol>
152 </div>
153 </div>
154
155 <div class="custom_column template">
156 <label class="wpallexport-xml-element"></label>
157 <input type="hidden" name="ids[]" value="1"/>
158 <input type="hidden" name="cc_label[]" value=""/>
159 <input type="hidden" name="cc_php[]" value="0"/>
160 <input type="hidden" name="cc_code[]" value=""/>
161 <input type="hidden" name="cc_sql[]" value="0"/>
162 <input type="hidden" name="cc_type[]" value=""/>
163 <input type="hidden" name="cc_options[]" value="0"/>
164 <input type="hidden" name="cc_value[]" value=""/>
165 <input type="hidden" name="cc_name[]" value=""/>
166 <input type="hidden" name="cc_settings[]" value="0"/>
167 </div>
168
169 <!-- Warning Messages -->
170 <?php if ( (($addons->isWooCommerceAddonActive() || $addons->isWooCommerceOrderAddonActive()) && ! XmlExportWooCommerceOrder::$is_active) && ! XmlExportComment::$is_active && ! XmlExportTaxonomy::$is_active ) : ?>
171 <div class="wp-all-export-warning" <?php if ( empty($post['ids']) or count($post['ids']) > 1 ) echo 'style="display:none;"'; ?>>
172 <p></p>
173 <input type="hidden" id="warning_template" value="<?php esc_html_e("Warning: without %s you won't be able to re-import this data back to this site using WP All Import.", "wp_all_export_plugin"); ?>"/>
174 <button class="notice-dismiss" type="button"><span class="screen-reader-text">Dismiss this notice.</span></button>
175 </div>
176 <?php endif; ?>
177
178 <?php if ( ($addons->isWooCommerceAddonActive() || $addons->isWooCommerceProductAddonActive()) && in_array('product', XmlExportEngine::$post_types) ) : ?>
179 <input type="hidden" id="is_product_export" value="1"/>
180 <?php endif; ?>
181
182 <?php if ( empty($post['cpt']) and ! ($addons->isWooCommerceAddonActive() && XmlExportWooCommerceOrder::$is_active) and ! ($addons->isUserAddonActive() && XmlExportUser::$is_active) and ! XmlExportComment::$is_active and ! XmlExportTaxonomy::$is_active ) : ?>
183 <input type="hidden" id="is_wp_query" value="1"/>
184 <?php endif; ?>
185
186 </fieldset>
187
188 <!-- Add New Field Button -->
189 <div class="input" style="display:inline-block; margin: 20px 0 10px 20px;">
190 <input type="button" value="<?php esc_html_e('Add Field', 'wp_all_export_plugin'); ?>"
191 class="add_column" style="float:left;">
192 <input type="button" value="<?php esc_html_e('Add All', 'wp_all_export_plugin'); ?>"
193 class="wp_all_export_auto_generate_data">
194 <input type="button" value="<?php esc_html_e('Clear All', 'wp_all_export_plugin'); ?>"
195 class="wp_all_export_clear_all_data">
196 </div>
197
198 <!-- Preview a Row Button -->
199 <div class="input" style="float:right; margin: 20px 20px 10px 0;">
200 <input type="button" value="<?php esc_html_e('Preview', 'wp_all_export_plugin'); ?>"
201 class="preview_a_row">
202 </div>
203 </div>
204
205 <?php include('variation_options_common.php');?>
206
207 <div class="wpallexport-collapsed closed wpallexport-section wpallexport-xml-advanced-options" <?php if ($post['export_to'] !== 'xml') { ?> style="display: none;" <?php }?> >
208 <div class="wpallexport-content-section rad0" style="margin:0; border-top:1px solid #ddd; border-bottom: none; border-right: none; border-left: none; background: #f1f2f2; padding-bottom: 15px; margin-top: 5px;">
209 <div class="wpallexport-collapsed-header">
210 <h3 style="color:#40acad;"><?php esc_html_e('Advanced Options','wp_all_export_plugin');?></h3>
211 <hr style="display:none; margin-right:25px;"/>
212 </div>
213 <div class="wpallexport-collapsed-content" style="padding:0 0 0 5px;">
214 <div class="wpallexport-collapsed-content-inner">
215 <div class="simple_xml_template_options" style="margin-top:20px;">
216 <div class="input" style="display: inline-block; max-width: 360px; width: 40%; margin-right: 10px;">
217 <label for="main_xml_tag" style="float: left;"><?php esc_html_e('Root XML Element','wp_all_export_plugin');?></label>
218 <div class="input">
219 <input type="text" name="main_xml_tag" style="vertical-align:middle; background:#fff !important; width: 100%; margin-left:0;" value="<?php echo esc_attr($post['main_xml_tag']) ?>" />
220 </div>
221 </div>
222 <div class="input" style="display: inline-block; max-width: 360px; width: 40%; ">
223 <?php
224 $post_type_details = ( ! empty($post['cpt'])) ? get_post_type_object( $post['cpt'][0] ) : '';
225 ?>
226 <label for="record_xml_tag" style="float: left;"><?php printf(esc_html__('Single %s XML Element','wp_all_export_plugin'), empty($post_type_details) ? 'Record' : $post_type_details->labels->singular_name); ?></label>
227 <div class="input">
228 <input type="text" name="record_xml_tag" style="vertical-align:middle; background:#fff !important; width: 100%; margin-left:0;" value="<?php echo esc_attr($post['record_xml_tag']) ?>" />
229 </div>
230 </div>
231 </div>
232 <input type="hidden" id="custom_xml_cdata_logic" value="<?php echo esc_attr($post['custom_xml_cdata_logic']); ?>" name="custom_xml_cdata_logic" />
233 <input type="hidden" id="show_cdata_in_preview" value="<?php echo esc_attr($post['show_cdata_in_preview']); ?>" name="show_cdata_in_preview" />
234
235 <div>
236 <?php if( (XmlExportEngine::get_addons_service()->isWooCommerceAddonActive() || XmlExportEngine::get_addons_service()->isWooCommerceProductAddonActive()) && XmlExportWooCommerce::$is_active)
237 {
238 include('variation_options.php');
239 }
240 ?>
241 </div>
242 <div class="wp-all-export-product-bundle-warning warning-only-export-parent-products" style="display:none;">
243 <p><?php esc_html_e("You will not be able to reimport data to the product variations, and you will not be able to import these products to another site.", 'wp_all_export_plugin'); ?></p>
244 </div>
245 <div class="wp-all-export-product-bundle-warning warning-only-export-product-variations" style="display:none;">
246 <p><?php esc_html_e("You will not be able to reimport data to the parent products, and you will not be able to import these products to another site.", 'wp_all_export_plugin'); ?></p>
247 </div>
248 <div class="input cdata">
249 <h4 style="margin-top: 20px;">CDATA</h4>
250 <p style="font-size: 12px;margin-top: 10px;"><?php echo wp_kses_post(sprintf(__("There are certain characters that cannot be included in an XML file unless they are wrapped in CDATA tags.<br/>Read more about CDATA tags: <a target='_blank' href='%s' style='font-size: 12px;'>%s</a>.", 'wp_all_export_plugin'), 'https://en.wikipedia.org/wiki/CDATA', 'https://en.wikipedia.org/wiki/CDATA')); ?></p>
251 <div class="input" style="margin: 8px 0;">
252 <input type="radio" id="simple_custom_xml_cdata_logic_auto" name="simple_custom_xml_cdata_logic" value="auto" checked="checked" <?php echo ( "auto" == $post['custom_xml_cdata_logic'] ) ? 'checked="checked"': '' ?> class="switcher cdata"/>
253 <label for="simple_custom_xml_cdata_logic_auto"><?php esc_html_e('Automatically wrap data in CDATA tags when it contains illegal characters', 'wp_all_export_plugin') ?></label>
254 </div>
255 <div class="input" style="margin: 8px 0;">
256 <input type="radio" id="simple_custom_xml_cdata_logic_all" name="simple_custom_xml_cdata_logic" value="all" <?php echo ( "all" == $post['custom_xml_cdata_logic'] ) ? 'checked="checked"': '' ?> class="switcher cdata" />
257 <label for="simple_custom_xml_cdata_logic_all"><?php esc_html_e('Always wrap data in CDATA tags', 'wp_all_export_plugin') ?></label>
258 </div>
259 <div class="input" style="margin: 8px 0;">
260 <input type="radio" id="simple_custom_xml_cdata_logic_never" name="simple_custom_xml_cdata_logic" value="never" <?php echo ( "never" == $post['custom_xml_cdata_logic'] ) ? 'checked="checked"': '' ?> class="switcher cdata"/>
261 <label for="simple_custom_xml_cdata_logic_never"><?php esc_html_e('Never wrap data in CDATA tags', 'wp_all_export_plugin') ?></label>
262 <div class="switcher-target-simple_custom_xml_cdata_logic_never">
263 <p style="font-size: 12px;margin-top: 8px;"><?php esc_html_e('Warning: This may result in an invalid XML file', 'wp_all_export_plugin');?></p>
264 </div>
265 </div>
266 <div class="input" style="margin: 16px 4px;">
267 <input type="checkbox" value="1" id="simple_show_cdata_in_preview" <?php echo ( 1 == $post['show_cdata_in_preview'] ) ? 'checked="checked"': '' ?> class="show_cdata_in_preview" />
268 <label for="simple_show_cdata_in_preview">Show CDATA tags in XML preview</label>
269 </div>
270 </div>
271 </div>
272 </div>
273 </div>
274 </div>
275
276 <!-- ExportToCsvBegin -->
277 <div class="wpallexport-collapsed closed wpallexport-section wpallexport-csv-advanced-options export_to_csv" <?php if ($post['export_to'] == 'xml') : ?> style="display: none;" <?php endif; ?> >
278 <div class="wpallexport-content-section rad0" style="margin:0; border-top:1px solid #ddd; border-bottom: none; border-right: none; border-left: none; background: #f1f2f2; padding-bottom: 15px; margin-top: 5px;">
279 <div class="wpallexport-collapsed-header">
280 <h3 style="color:#40acad;"><?php esc_html_e('Advanced Options','wp_all_export_plugin');?></h3>
281 <hr style="display:none; margin-right:25px;"/>
282 </div>
283 <div class="wpallexport-collapsed-content" style="padding:0 0 0 5px;">
284 <div class="wpallexport-collapsed-content-inner" style="padding-left: 5px;">
285 <div class="simple_xml_template_options csv_delimiter" style="margin-top:20px;">
286 <div class="input" style="display: inline-block; max-width: 360px; width: 40%; margin-right: 10px;">
287 <label style="width: 80px; margin-left: 20px;"><?php esc_html_e('Separator:','wp_all_export_plugin');?></label>
288 <input type="text" name="delimiter" value="<?php echo esc_attr($post['delimiter']) ?>" style="width: 40px; height: 30px; top: 0px; text-align: center;"/>
289 </div>
290 </div>
291 <?php if (class_exists('SitePress')): ?>
292 <div class="wp-all-export-wpml-options" style="margin-left:20px;">
293 <h4><?php esc_html_e('Language', 'wp_all_export_plugin'); ?></h4>
294 <div class="input">
295 <?php foreach ($wpml_options as $key => $value):?>
296 <div class="input">
297 <input type="radio" id="<?php echo esc_attr("wpml_lang_" . $key);?>" name="wpml_lang" value="<?php echo esc_attr($key); ?>" <?php if ($post['wpml_lang'] == $key):?>checked="checked"<?php endif; ?> class="switcher"/>
298 <label for="<?php echo esc_attr("wpml_lang_" . $key);?>"><?php echo wp_kses_post($value); ?></label>
299 </div>
300 <?php endforeach; ?>
301 </div>
302 </div>
303 <?php endif; ?>
304 <div style="margin-left:20px;">
305 <?php if( (XmlExportEngine::get_addons_service()->isWooCommerceAddonActive() || XmlExportEngine::get_addons_service()->isWooCommerceProductAddonActive()) && XmlExportWooCommerce::$is_active)
306 {
307 include('variation_options.php');
308 }
309 ?>
310 </div>
311 <div class="wp-all-export-product-bundle-warning" style="display:none;">
312 <p><?php esc_html_e("You will not be able to reimport data to the product variations, and you will not be able to import these products to another site.", 'wp_all_export_plugin'); ?></p>
313 </div>
314 <!-- Display each product in its own row -->
315 <?php if ( ($addons->isWooCommerceAddonActive() && XmlExportWooCommerceOrder::$is_active) ): ?>
316 <div class="input" style="float: left; margin-top: 15px; margin-left:20px;" id="woo_commerce_order">
317 <input type="hidden" name="order_item_per_row" value="0"/>
318 <input type="checkbox" id="order_item_per_row" name="order_item_per_row" value="1" <?php if ($post['order_item_per_row']):?>checked="checked"<?php endif; ?> class="switcher"/>
319 <label for="order_item_per_row"><?php esc_html_e("Display each product in its own row", "wp_all_export_plugin"); ?></label>
320 <a href="#help" class="wpallexport-help" style="position: relative; top: 0px;" title="<?php esc_html_e('If an order contains multiple products, each product will have its own row. If disabled, each product will have its own column.', 'wp_all_export_plugin'); ?>">?</a>
321 <div class="input switcher-target-order_item_per_row" style="margin-top: 10px; text-align:left;">
322 <input type="hidden" name="order_item_fill_empty_columns" value="0"/>
323 <input type="checkbox" id="order_item_fill_empty_columns" name="order_item_fill_empty_columns" value="1" <?php if ($post['order_item_fill_empty_columns']):?>checked="checked"<?php endif; ?>/>
324 <label for="order_item_fill_empty_columns"><?php esc_html_e("Fill in empty columns", "wp_all_export_plugin"); ?></label>
325 <a href="#help" class="wpallexport-help" style="position: relative; top: 0px;"
326 title="<?php esc_html_e('If enabled, each order item will appear as its own row with all order info filled in for every column. If disabled, order info will only display on one row with only the order item info displaying in additional rows.', 'wp_all_export_plugin'); ?>">?</a>
327 </div>
328 </div>
329 <div class="clear"></div>
330 <?php endif; ?>
331 </div>
332 </div>
333 </div>
334 </div>
335 <!-- ExporToCsvEnd -->
336 </div>
337 </div>
338
339 <div class="wpallexport-collapsed wpallexport-section wpallexport-file-options closed" style="margin-top: 0px;">
340 <div class="wpallexport-content-section" style="padding-bottom: 15px; margin-bottom: 10px;">
341 <div class="wpallexport-collapsed-header" style="padding-left: 25px;">
342 <h3><?php esc_html_e('Export Type','wp_all_export_plugin');?></h3>
343 </div>
344 <div class="wpallexport-collapsed-content" style="padding: 0; overflow: hidden;">
345 <div class="wpallexport-collapsed-content-inner">
346 <div class="wpallexport-choose-data-type">
347 <h3 style="margin-top: 10px; margin-bottom: 40px;"><?php esc_html_e('Choose your export type', 'wp_all_export_plugin'); ?></h3>
348 <a href="javascript:void(0);" class="wpallexport-import-to-format rad4 wpallexport-csv-type <?php if ($post['export_to'] != XmlExportEngine::EXPORT_TYPE_XML) echo 'selected'; ?>">
349 <span class="wpallexport-import-to-title"><?php esc_html_e('Spreadsheet', 'wp_all_export_plugin'); ?></span>
350 <span class="wpallexport-import-to-arrow"></span>
351 </a>
352 <a href="javascript:void(0);" class="wpallexport-import-to-format rad4 wpallexport-xml-type <?php if ($post['export_to'] == XmlExportEngine::EXPORT_TYPE_XML) echo 'selected'; ?>" style="margin-right:0;">
353 <span class="wpallexport-import-to-title"><?php esc_html_e('Feed', 'wp_all_export_plugin'); ?></span>
354 <span class="wpallexport-import-to-arrow"></span>
355 </a>
356 </div>
357
358 <div class="wpallexport-all-options">
359 <input type="hidden" name="export_to" value="<?php echo esc_attr($post['export_to']); ?>"/>
360
361 <div class="wpallexport-file-format-options">
362
363 <div class="wpallexport-csv-options" style="<?php if ($post['export_to'] == XmlExportEngine::EXPORT_TYPE_XML || $post['export_to'] == XmlExportEngine::EXPORT_TYPE_GOOLE_MERCHANTS) echo 'display:none;'; ?>">
364 <!-- Export File Format -->
365 <div class="input">
366 <select name="export_to_sheet" id="export_to_sheet">
367 <option value="csv" <?php if ($post['export_to_sheet'] == 'csv') echo 'selected="selected"';?>><?php esc_html_e('CSV File', 'wp_all_export_plugin'); ?></option>
368 <option value="xls" <?php if ($post['export_to_sheet'] == 'xls') echo 'selected="selected"';?>><?php esc_html_e('Excel File (XLS)', 'wp_all_export_plugin'); ?></option>
369 <option value="xlsx" <?php if ($post['export_to_sheet'] == 'xlsx') echo 'selected="selected"';?>><?php esc_html_e('Excel File (XLSX)', 'wp_all_export_plugin'); ?></option>
370 </select>
371 </div>
372 <div class="clear"></div>
373 <div class="wpallexport-clear"></div>
374 <div class="input export_to_xls_upgrade_notice" style="vertical-align:middle; position: relative; margin-top: 48px;">
375 <span class="wpallexport-free-edition-notice">
376 <a class="upgrade_link" target="_blank" href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=2707173&edd_options%5Bprice_id%5D=1&utm_source=export-plugin-free&utm_medium=upgrade-notice&utm_campaign=export-excel"><?php esc_html_e('Upgrade to the Pro edition of WP All Export to Export to Excel','wp_all_export_plugin');?></a>
377 <p><?php esc_html_e('If you already own it, remove the free edition and install the Pro edition.','wp_all_export_plugin');?></p>
378 </span>
379 </div>
380 </div>
381
382 <div class="wpallexport-xml-options" <?php if ($post['export_to'] != XmlExportEngine::EXPORT_TYPE_XML) echo 'style="display:none;"'; ?>>
383 <div class="input">
384 <select name="xml_template_type" class="xml_template_type">
385 <option value="simple" <?php if ($post['xml_template_type'] == 'simple') echo 'selected="selected"';?>><?php esc_html_e('Simple XML Feed', 'wp_all_export_plugin'); ?></option>
386 <option value="custom" <?php if ($post['xml_template_type'] == 'custom') echo 'selected="selected"';?>><?php esc_html_e('Custom XML Feed', 'wp_all_export_plugin'); ?></option>
387 <?php
388 if(in_array('product', $post['cpt'])) {
389 ?>
390 <option value="<?php echo XmlExportEngine::EXPORT_TYPE_GOOLE_MERCHANTS; ?>" <?php if ($post['xml_template_type'] == XmlExportEngine::EXPORT_TYPE_GOOLE_MERCHANTS) echo 'selected="selected"';?>><?php esc_html_e('Google Merchant Center Product Feed', 'wp_all_export_plugin'); ?></option>
391 <?php
392 }
393 ?>
394 </select>
395 </div>
396 </div>
397 </div>
398 </div>
399 </div>
400 </div>
401 </div>
402 </div>
403
404 <!-- Google Merchants -->
405 <?php include(__DIR__.'/google.php'); ?>
406
407 <div class="error inline" id="validationError" style="display: none;">
408 <p>
409
410 </p>
411 </div>
412
413 <div class="wpallexport-collapsed wpallexport-section wpallexport-custom-xml-template">
414 <div class="wpallexport-content-section" style="padding-bottom: 0; margin-bottom: 10px;">
415 <div class="wpallexport-collapsed-header" style="margin-bottom: 15px;">
416 <h3><?php esc_html_e('XML Editor', 'wp_all_export_plugin'); ?></h3>
417 </div>
418 <div class="wpallexport-collapsed-content" style="padding: 0;">
419 <div class="wpallexport-collapsed-content-inner" style="padding-top: 5px;">
420
421 <?php $default_template = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<data>\n\t<!-- BEGIN LOOP -->\n\t<post>\n\n\t</post>\n\t<!-- END LOOP -->\n</data>";?>
422
423 <textarea id="wp_all_export_custom_xml_template" name="custom_xml_template"><?php echo (empty($post['custom_xml_template'])) ? esc_textarea($default_template) : esc_textarea($post['custom_xml_template']);?></textarea>
424
425 <div class="input" style="overflow: hidden; margin-top: 10px; margin-bottom: -20px;">
426 <!-- Help Button -->
427 <div class="input" style="float: left;">
428 <input type="button" value="<?php esc_html_e('Help', 'wp_all_export_plugin'); ?>"
429 class="help_custom_xml">
430 </div>
431 <!-- Preview a Row Button -->
432 <div class="input" style="float: right;">
433 <input type="button" value="<?php esc_html_e('Preview', 'wp_all_export_plugin'); ?>"
434 class="preview_a_custom_xml_row">
435 </div>
436 </div>
437 </div>
438 <div class="wpallexport-collapsed closed wpallexport-section">
439 <div class="wpallexport-content-section rad0"
440 style="margin:0; border-top:1px solid #ddd; border-bottom: none; border-right: none; border-left: none; background: #f1f2f2; padding-bottom: 15px; margin-top: 5px;">
441 <div class="wpallexport-collapsed-header">
442 <h3 style="color:#40acad;"><?php esc_html_e('Advanced Options','wp_all_export_plugin');?></h3>
443 <hr style="display: none; margin-right: 25px;"/>
444 </div>
445 <div class="wpallexport-collapsed-content" style="padding: 0 0 0 5px;">
446 <div class="wpallexport-collapsed-content-inner">
447 <div class="input cdata">
448 <h4 style="margin-top: 20px;">CDATA</h4>
449 <p style="font-size: 12px;margin-top: 8px;"><?php echo wp_kses_post(printf(__("There are certain characters that cannot be included in an XML file unless they are wrapped in CDATA tags.<br/>Read more about CDATA tags: <a target='_blank' href='%s' style='font-size: 12px;'>%s</a>.", 'wp_all_export_plugin'), 'https://en.wikipedia.org/wiki/CDATA', 'https://en.wikipedia.org/wiki/CDATA')); ?></p>
450 <div class="input" style="margin: 8px 0;">
451 <input type="radio" id="custom_xml_cdata_logic_auto"
452 name="custom_custom_xml_cdata_logic"
453 value="auto" <?php echo ("auto" == $post['custom_xml_cdata_logic']) ? 'checked="checked"' : '' ?>
454 class="switcher"/>
455 <label
456 for="custom_xml_cdata_logic_auto"><?php esc_html_e('Automatically wrap data in CDATA tags when it contains illegal characters', 'wp_all_export_plugin') ?></label>
457 </div>
458 <div class="input" style="margin: 8px 0;">
459 <input type="radio" id="custom_custom_xml_cdata_logic_all"
460 name="custom_custom_xml_cdata_logic"
461 value="all" <?php echo ("all" == $post['custom_xml_cdata_logic']) ? 'checked="checked"' : '' ?>
462 class="switcher cdata"/>
463 <label
464 for="custom_custom_xml_cdata_logic_all"><?php esc_html_e('Always wrap data in CDATA tags', 'wp_all_export_plugin') ?></label>
465 </div>
466 <div class="input" style="margin: 8px 0;">
467 <input type="radio" id="custom_custom_xml_cdata_logic_never"
468 name="custom_custom_xml_cdata_logic"
469 value="never" <?php echo ("never" == $post['custom_xml_cdata_logic']) ? 'checked="checked"' : '' ?>
470 class="switcher cdata"/>
471 <label
472 for="custom_custom_xml_cdata_logic_never"><?php esc_html_e('Never wrap data in CDATA tags', 'wp_all_export_plugin') ?></label>
473 <div class="switcher-target-simple_custom_xml_cdata_logic_never">
474 <p style="font-size: 12px;margin-top: 8px;"><?php esc_html_e('Warning: This may result in an invalid XML file', 'wp_all_export_plugin');?></p>
475 </div>
476 </div>
477 <div class="input" style="margin: 16px 4px;">
478 <input type="checkbox" value="1" name="custom_show_cdata_in_preview"
479 id="custom_show_cdata_in_preview" <?php echo (1 == $post['show_cdata_in_preview']) ? 'checked="checked"' : '' ?>
480 class="show_cdata_in_preview"/>
481 <label for="custom_show_cdata_in_preview">Show CDATA tags in XML
482 preview</label>
483 </div>
484 </div>
485 </div>
486 </div>
487 </div>
488 </div>
489 </div>
490 </div>
491 </div>
492
493 <?php
494
495 $uploads = wp_upload_dir();
496 $functions = $uploads['basedir'] . DIRECTORY_SEPARATOR . WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'functions.php';
497
498 ?>
499
500 <div class="wpallexport-collapsed closed wpallexport-section wpallexport-custom-xml-template">
501 <div class="wpallexport-content-section" style="padding-bottom: 15px; margin-bottom: 10px;">
502 <div class="wpallexport-collapsed-header">
503 <h3><?php esc_html_e('Function Editor', 'wp_all_export_plugin'); ?></h3>
504 </div>
505 <div class="wpallexport-collapsed-content" style="padding: 0;">
506 <div class="wpallexport-collapsed-content-inner">
507
508 <textarea id="wp_all_export_main_code" name="wp_all_export_main_code"><?php echo "<?php\n\n?>";?></textarea>
509 <div class="wpallexport-free-edition-notice" style="margin: 15px 0;">
510 <a class="upgrade_link" target="_blank" href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=2707173&edd_options%5Bprice_id%5D=1&utm_source=export-plugin-free&utm_medium=upgrade-notice&utm_campaign=custom-php"><?php esc_html_e('Upgrade to the Pro edition of WP All Export to use Custom PHP Functions','wp_all_export_plugin');?></a>
511 <p><?php esc_html_e('If you already own it, remove the free edition and install the Pro edition.','wp_all_export_plugin');?></p>
512 </div>
513 <div class="input" style="margin-top: 10px;">
514
515 <div class="input" style="display:inline-block; margin-right: 20px;">
516 <input type="button" class="button-primary wp_all_export_save_functions wp_all_export_save_main_code" value="<?php esc_html_e("Save Functions", 'wp_all_export_plugin'); ?>" disabled="disabled"/>
517 <a href="#help" class="wpallexport-help" title="<?php printf(esc_html__("Add functions here for use during your export. You can access this file at %s", "wp_all_export_plugin"), preg_replace("%.*wp-content%", "wp-content", esc_html($functions)));?>" style="top: 0;">?</a>
518 <div class="wp_all_export_functions_preloader"></div>
519 </div>
520 <div class="input wp_all_export_saving_status"></div>
521 </div>
522 </div>
523 </div>
524 </div>
525 </div>
526
527 <hr>
528
529 <div class="input wpallexport-section load-template-container" style="padding-bottom: 8px; padding-left: 8px;">
530 <p style="margin: 11px; float: left;">
531 <input type="hidden" name="save_template_as" value="0" />
532 <input type="checkbox" id="save_template_as" name="save_template_as"
533 class="switcher-horizontal fix_checkbox"
534 value="1" <?php echo (!empty($post['save_template_as'])) ? 'checked="checked"' : '' ?> />
535 <label
536 for="save_template_as"><?php esc_html_e('Save settings as a template', 'wp_all_export_plugin'); ?></label>
537 </p>
538 <div class="switcher-target-save_template_as" style="float: left; overflow: hidden;">
539 <input type="text" name="name"
540 placeholder="<?php esc_html_e('Template name...', 'wp_all_export_plugin') ?>"
541 style="vertical-align:middle; line-height: 26px;"
542 value="<?php echo esc_attr($post['name']) ?>"/>
543 </div>
544 <?php $templates = new PMXE_Template_List(); ?>
545 <div class="load-template">
546 <select name="load_template" id="load_template">
547 <option value=""><?php esc_html_e('Load Template...', 'wp_all_export_plugin') ?></option>
548 <?php foreach ($templates->getBy()->convertRecords() as $t): ?>
549 <?php
550 // When creating a new export you should be able to select existing saved export templates that were created for the same post type.
551 if ( $t->options['cpt'] != $post['cpt'] ) continue;
552 ?>
553 <option value="<?php echo esc_attr($t->id) ?>"><?php echo esc_html(wp_all_export_clear_xss($t->name)); ?></option>
554 <?php endforeach ?>
555 </select>
556 </div>
557
558 </div>
559
560 <hr>
561
562 <div class="input custom_xml_upgrade_notice wpallexport-custom-xml-template" style="vertical-align:middle; position: relative; top: -5px;">
563 <span class="wpallexport-free-edition-notice" style="margin: 0 0 10px;">
564 <a class="upgrade_link" target="_blank" href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=2707173&edd_options%5Bprice_id%5D=1&utm_source=export-plugin-free&utm_medium=upgrade-notice&utm_campaign=custom-xml"><?php esc_html_e('Upgrade to the Pro edition of WP All Export to Export Custom XML','wp_all_export_plugin');?></a>
565 <p><?php esc_html_e('If you already own it, remove the free edition and install the Pro edition.','wp_all_export_plugin');?></p>
566 </span>
567 </div>
568
569 <div class="input custom_xml_upgrade_notice wpallexport-google-merchants-template" style="vertical-align:middle; position: relative; top: -5px;">
570 <span class="wpallexport-free-edition-notice" style="margin: 0 0 10px;">
571 <a class="upgrade_link" target="_blank" href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=2707173&edd_options%5Bprice_id%5D=1&utm_source=export-plugin-free&utm_medium=upgrade-notice&utm_campaign=google-merchant-center"><?php esc_html_e('Upgrade to the Pro edition of WP All Export to Export To Google Merchant Center','wp_all_export_plugin');?></a>
572 <p><?php esc_html_e('If you already own it, remove the free edition and install the Pro edition.','wp_all_export_plugin');?></p>
573 </span>
574 </div>
575
576 <div class="wpallexport-submit-buttons">
577
578 <div style="text-align:center; width:100%;">
579 <?php wp_nonce_field('template', '_wpnonce_template'); ?>
580 <input type="hidden" name="is_submitted" value="1" />
581 <input type="hidden" id="dismiss_warnings" value="<?php echo esc_attr($dismiss_warnings); ?>"/>
582 <?php if ( ! $this->isWizard ): ?>
583 <a href="<?php echo esc_url(remove_query_arg('id', remove_query_arg('action', esc_url($this->baseUrl)))); ?>"
584 class="back rad3"
585 style="float:none;"><?php esc_html_e('Back to Manage Exports', 'wp_all_export_plugin') ?></a>
586 <?php else: ?>
587 <a href="<?php echo esc_url(add_query_arg('action', 'index', esc_url($this->baseUrl))); ?>"
588 class="back rad3"><?php esc_html_e('Back', 'wp_all_export_plugin') ?></a>
589 <?php endif; ?>
590 <input type="submit" class="button button-primary button-hero wpallexport-large-button"
591 value="<?php esc_html_e(($this->isWizard) ? 'Continue' : 'Update Template', 'wp_all_export_plugin') ?>"/>
592 </div>
593
594 </div>
595
596 <a href="http://soflyy.com/" target="_blank"
597 class="wpallexport-created-by"><?php esc_html_e('Created by', 'wp_all_export_plugin'); ?> <span></span></a>
598
599 </form>
600
601 </td>
602
603 <td class="right template-sidebar" style="position: relative; width: 18%; right: 0px; padding: 0;">
604
605 <fieldset id="available_data" class="optionsset rad4 wpae_available_data">
606
607 <div class="title"><?php esc_html_e('Available Data', 'wp_all_export_plugin'); ?></div>
608
609 <div class="wpallexport-xml resetable">
610
611 <ul>
612
613 <?php
614 // Output sanitized in children
615 echo $available_data_view;
616 ?>
617
618 </ul>
619
620 </div>
621
622 </fieldset>
623 </td>
624 </tr>
625
626 </table>
627
628 <fieldset class="optionsset column rad4 wp-all-export-edit-column">
629
630 <div class="title"><span
631 class="wpallexport-add-row-title" style="font-size: 14px;"><?php esc_html_e('Add Field To Export', 'wp_all_export_plugin'); ?></span><span
632 class="wpallexport-edit-row-title" style="font-size: 14px;"><?php esc_html_e('Edit Export Field', 'wp_all_export_plugin'); ?></span></div>
633
634 <?php include_once 'template/add_new_field.php'; ?>
635
636 </fieldset>
637
638 <fieldset class="optionsset column rad4 wp-all-export-custom-xml-help">
639
640 <div class="title"><span style="font-size:1.5em;"
641 class="wpallexport-add-row-title"><?php esc_html_e('Custom XML Feeds', 'wp_all_export_plugin'); ?></span><span
642 class="wpallexport-edit-row-title"><?php _e('Edit Export Field', 'wp_all_export_plugin'); ?></span></div>
643
644 <?php include_once 'template/custom_xml_help.php'; ?>
645
646 </fieldset>
647
648 <div class="wpallexport-overlay"></div>
649