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