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