PluginProbe ʕ •ᴥ•ʔ
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel / 1.2.2
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel v1.2.2
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 7 years ago options 7 years ago template 7 years ago google.php 7 years ago index.php 7 years ago options.php 7 years ago process.php 7 years ago success_page.php 7 years ago template.php 7 years ago variation_options.php 7 years ago variation_options_common.php 7 years ago
template.php
632 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 <p><?php _e('WP All Export', 'wp_all_export_plugin'); ?></p>
7 <h2><?php _e('Export to XML / CSV', 'wp_all_export_plugin'); ?></h2>
8 </div>
9 <div class="wpallexport-links">
10 <a href="http://www.wpallimport.com/support/"
11 target="_blank"><?php _e('Support', 'wp_all_export_plugin'); ?></a> |
12 <a
13 href="http://www.wpallimport.com/documentation/"
14 target="_blank"><?php _e('Documentation', 'wp_all_export_plugin'); ?></a>
15 </div>
16 </div>
17 <div class="clear"></div>
18 </div>
19
20 <div class="clear"></div>
21
22 <div class="wpallexport-content-section wpallexport-console" style="display: block; margin-bottom: 10px;">
23 <div class="ajax-console">
24 <div class="founded_records">
25 <div class="wp_all_export_preloader"></div>
26 <h4><?php _e("Drag &amp; drop data to include in the export file."); ?></h4>
27 </div>
28 </div>
29 </div>
30
31 <?php \Wpae\Pro\Filtering\FilteringFactory::render_filtering_block( $engine, $this->isWizard, $post, true ); ?>
32
33 <table class="wpallexport-layout wpallexport-export-template">
34 <tr>
35 <td class="left">
36
37 <?php do_action('pmxe_template_header', $this->isWizard, $post); ?>
38
39 <?php if ($this->errors->get_error_codes()): ?>
40 <?php $this->error(); ?>
41 <?php endif ?>
42
43 <form class="wpallexport-template <?php echo ! $this->isWizard ? 'edit' : '' ?> wpallexport-step-3" method="post" style="display:none;" id="templateForm">
44
45 <input type="hidden" class="hierarhy-output" name="filter_rules_hierarhy" value="<?php echo esc_html($post['filter_rules_hierarhy']);?>"/>
46 <input type="hidden" name="taxonomy_to_export" value="<?php echo $post['taxonomy_to_export'];?>">
47 <input type="hidden" name="export_only_modified_stuff" value="<?php echo $post['export_only_modified_stuff'];?>" />
48 <input type="hidden" name="export_only_new_stuff" value="<?php echo $post['export_only_new_stuff'];?>" />
49
50 <?php
51 $selected_post_type = '';
52 if (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 ! 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 ! 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">
235 <h4>CDATA</h4>
236 <p style="font-style: italic;"><?php echo sprintf(__("There are certain characters that cannot be included in an XML file unless they are wrapped in CDATA tags.<br/><a target='_blank' href='%s'>Click here to read more about CDATA tags.</a>", 'wp_all_export_plugin'), 'https://en.wikipedia.org/wiki/CDATA'); ?></p>
237 <div class="input" style="margin: 3px 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: 3px 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: 3px 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" style="padding-left:17px;">
249 <p style="font-style: italic;"><?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: 10px 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=118611&edd_options%5Bprice_id%5D=1&utm_source=wordpress.org&utm_medium=wooco+orders&utm_campaign=free+wp+all+export+plugin"><?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">
432 <h4>CDATA</h4>
433 <p style="font-style: italic;"><?php echo sprintf(__("There are certain characters that cannot be included in an XML file unless they are wrapped in CDATA tags.<br/><a target='_blank' href='%s'>Click here to read more about CDATA tags.</a>", 'wp_all_export_plugin'), 'https://en.wikipedia.org/wiki/CDATA'); ?></p>
434 <div class="input" style="margin: 3px 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: 3px 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: 3px 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 style="padding-left:17px;">
459 <p style="font-style: italic;"><?php _e('Warning: This may result in an invalid XML file', 'wp_all_export_plugin');?></p>
460 </div>
461 </div>
462 <div class="input" style="margin: 10px 3px;">
463 <input type="checkbox" value="1" name="custom_show_cdata_in_preview"
464 id="custom_show_cdata_in_preview" <?php echo (1 == $post['show_cdata_in_preview']) ? 'checked="checked"' : '' ?>
465 class="show_cdata_in_preview"/>
466 <label for="custom_show_cdata_in_preview">Show CDATA tags in XML
467 preview</label>
468 </div>
469 </div>
470 </div>
471 </div>
472 </div>
473 </div>
474 </div>
475 </div>
476 </div>
477
478 <?php
479
480 $uploads = wp_upload_dir();
481 $functions = $uploads['basedir'] . DIRECTORY_SEPARATOR . WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'functions.php';
482
483 ?>
484
485 <div class="wpallexport-collapsed closed wpallexport-section wpallexport-custom-xml-template">
486 <div class="wpallexport-content-section" style="padding-bottom: 15px; margin-bottom: 10px;">
487 <div class="wpallexport-collapsed-header">
488 <h3><?php _e('Function Editor', 'wp_all_export_plugin'); ?></h3>
489 </div>
490 <div class="wpallexport-collapsed-content" style="padding: 0;">
491 <div class="wpallexport-collapsed-content-inner">
492
493 <textarea id="wp_all_export_main_code" name="wp_all_export_main_code"><?php echo "<?php\n\n?>";?></textarea>
494 <div class="wpallexport-free-edition-notice" style="margin: 15px 0;">
495 <a class="upgrade_link" target="_blank" href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=118611&edd_options%5Bprice_id%5D=1&utm_source=wordpress.org&utm_medium=custom-php&utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export to use Custom PHP Functions','wp_all_export_plugin');?></a>
496 <p><?php _e('If you already own it, remove the free edition and install the Pro edition.','wp_all_export_plugin');?></p>
497 </div>
498 <div class="input" style="margin-top: 10px;">
499
500 <div class="input" style="display:inline-block; margin-right: 20px;">
501 <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"/>
502 <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>
503 <div class="wp_all_export_functions_preloader"></div>
504 </div>
505 <div class="input wp_all_export_saving_status" style="display:inline-block;"></div>
506 </div>
507 </div>
508 </div>
509 </div>
510 </div>
511
512 <hr>
513
514 <div class="input wpallexport-section" style="padding-bottom: 8px; padding-left: 8px;">
515
516 <p style="margin: 11px; float: left;">
517 <input type="hidden" name="save_template_as" value="0" />
518 <input type="checkbox" id="save_template_as" name="save_template_as"
519 class="switcher-horizontal fix_checkbox"
520 value="1" <?php echo (!empty($post['save_template_as'])) ? 'checked="checked"' : '' ?> />
521 <label
522 for="save_template_as"><?php _e('Save settings as a template', 'wp_all_export_plugin'); ?></label>
523 </p>
524 <div class="switcher-target-save_template_as" style="float: left; overflow: hidden;">
525 <input type="text" name="name"
526 placeholder="<?php _e('Template name...', 'wp_all_export_plugin') ?>"
527 style="vertical-align:middle; line-height: 26px;"
528 value="<?php echo esc_attr($post['name']) ?>"/>
529 </div>
530 <?php $templates = new PMXE_Template_List(); ?>
531 <div class="load-template">
532 <select name="load_template" id="load_template" style="padding:2px; width: auto; height: 40px;">
533 <option value=""><?php _e('Load Template...', 'wp_all_export_plugin') ?></option>
534 <?php foreach ($templates->getBy()->convertRecords() as $t): ?>
535 <?php
536 // When creating a new export you should be able to select existing saved export templates that were created for the same post type.
537 if ( $t->options['cpt'] != $post['cpt'] ) continue;
538 ?>
539 <option value="<?php echo $t->id ?>"><?php echo $t->name ?></option>
540 <?php endforeach ?>
541 </select>
542 </div>
543
544 </div>
545
546 <hr>
547
548 <div class="input custom_xml_upgrade_notice wpallexport-custom-xml-template" style="vertical-align:middle; position: relative; top: -5px;">
549 <span class="wpallexport-free-edition-notice" style="margin: 0 0 10px;">
550 <a class="upgrade_link" target="_blank" href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=118611&edd_options%5Bprice_id%5D=1&utm_source=wordpress.org&utm_medium=wooco+orders&utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export to Export Custom XML','wp_all_export_plugin');?></a>
551 <p><?php _e('If you already own it, remove the free edition and install the Pro edition.','wp_all_export_plugin');?></p>
552 </span>
553 </div>
554
555 <div class="input custom_xml_upgrade_notice wpallexport-google-merchants-template" style="vertical-align:middle; position: relative; top: -5px;">
556 <span class="wpallexport-free-edition-notice" style="margin: 0 0 10px;">
557 <a class="upgrade_link" target="_blank" href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=118611&edd_options%5Bprice_id%5D=1&utm_source=wordpress.org&utm_medium=google+merchant+center&utm_campaign=free+wp+all+export+plugin"><?php _e('Upgrade to the Pro edition of WP All Export to Export To Google Merchant Center','wp_all_export_plugin');?></a>
558 <p><?php _e('If you already own it, remove the free edition and install the Pro edition.','wp_all_export_plugin');?></p>
559 </span>
560 </div>
561
562 <div class="wpallexport-submit-buttons">
563
564 <div style="text-align:center; width:100%;">
565 <?php wp_nonce_field('template', '_wpnonce_template'); ?>
566 <input type="hidden" name="is_submitted" value="1" />
567 <input type="hidden" id="dismiss_warnings" value="<?php echo esc_attr($dismiss_warnings); ?>"/>
568 <?php if ( ! $this->isWizard ): ?>
569 <a href="<?php echo remove_query_arg('id', remove_query_arg('action', $this->baseUrl)); ?>"
570 class="back rad3"
571 style="float:none;"><?php _e('Back to Manage Exports', 'wp_all_export_plugin') ?></a>
572 <?php else: ?>
573 <a href="<?php echo add_query_arg('action', 'index', $this->baseUrl); ?>"
574 class="back rad3"><?php _e('Back', 'wp_all_export_plugin') ?></a>
575 <?php endif; ?>
576 <input type="submit" class="button button-primary button-hero wpallexport-large-button"
577 value="<?php _e(($this->isWizard) ? 'Continue' : 'Update Template', 'wp_all_export_plugin') ?>"/>
578 </div>
579
580 </div>
581
582 <a href="http://soflyy.com/" target="_blank"
583 class="wpallexport-created-by"><?php _e('Created by', 'wp_all_export_plugin'); ?> <span></span></a>
584
585 </form>
586
587 </td>
588
589 <td class="right template-sidebar" style="position: relative; width: 18%; right: 0px; padding: 0;">
590
591 <fieldset id="available_data" class="optionsset rad4 wpae_available_data">
592
593 <div class="title"><?php _e('Available Data', 'wp_all_export_plugin'); ?></div>
594
595 <div class="wpallexport-xml resetable">
596
597 <ul>
598
599 <?php echo $available_data_view; ?>
600
601 </ul>
602
603 </div>
604
605 </fieldset>
606 </td>
607 </tr>
608
609 </table>
610
611 <fieldset class="optionsset column rad4 wp-all-export-edit-column">
612
613 <div class="title"><span
614 class="wpallexport-add-row-title" style="font-size: 14px;"><?php _e('Add Field To Export', 'wp_all_export_plugin'); ?></span><span
615 class="wpallexport-edit-row-title" style="font-size: 14px;"><?php _e('Edit Export Field', 'wp_all_export_plugin'); ?></span></div>
616
617 <?php include_once 'template/add_new_field.php'; ?>
618
619 </fieldset>
620
621 <fieldset class="optionsset column rad4 wp-all-export-custom-xml-help">
622
623 <div class="title"><span style="font-size:1.5em;"
624 class="wpallexport-add-row-title"><?php _e('Custom XML Feeds', 'wp_all_export_plugin'); ?></span><span
625 class="wpallexport-edit-row-title"><?php _e('Edit Export Field', 'wp_all_export_plugin'); ?></span></div>
626
627 <?php include_once 'template/custom_xml_help.php'; ?>
628
629 </fieldset>
630
631 <div class="wpallexport-overlay"></div>
632