PluginProbe ʕ •ᴥ•ʔ
WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets / 4.1.1
WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets v4.1.1
4.1.1 3.9.5 3.9.6 4.0.0 4.0.1 4.1.0 trunk 2.12 2.13 2.14 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4.0 3.4.1 3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 3.4.9 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.5.7 3.5.8 3.5.9 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.6.5 3.6.6 3.6.7 3.6.8 3.6.9 3.7.0 3.7.1 3.7.2 3.7.3 3.7.3-beta-1.0 3.7.4 3.7.4-beta-1.0 3.7.5 3.7.6 3.7.7 3.7.8 3.7.9 3.8.0 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4
wp-all-import / views / admin / import / preview_taxonomies.php
wp-all-import / views / admin / import Last commit date
options 3 days ago template 1 month ago confirm.php 1 month ago element.php 1 month ago error.php 1 month ago evaluate.php 1 month ago evaluate_variations.php 1 month ago filters.php 1 month ago full-preview-modal.php 1 month ago index.php 1 month ago options.php 1 month ago preview.php 1 month ago preview_images.php 1 month ago preview_prices.php 1 month ago preview_taxonomies.php 1 month ago process-complete.php 1 month ago process.php 1 month ago tag.php 1 month ago template.php 1 month ago warning.php 1 month ago
preview_taxonomies.php
79 lines
1 <?php if ( ! defined( 'ABSPATH' ) ) exit; // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals ?>
2 <div id="post-preview" class="wpallimport-preview_taxonomies">
3
4 <div class="title">
5 <div class="navigation">
6 <?php if ($tagno > 1): ?><a href="#prev" class="previous_element">&nbsp;</a><?php else: ?><span class="previous_element">&nbsp;</span><?php endif ?>
7 <?php /* translators: see placeholders in the string below */ ?>
8 <?php echo wp_kses(sprintf(__('<strong><input type="text" value="%1$s" name="tagno" class="tagno"/></strong><span class="out_of"> of <strong class="pmxi_count">%2$s</strong></span>', 'wp-all-import'), intval($tagno), intval(PMXI_Plugin::$session->count)), array('strong' => array('class' => array()), 'span' => array('class' => array()), 'input' => array('type' => array(), 'value' => array(), 'name' => array(), 'class' => array()))); ?>
9 <?php if ($tagno < PMXI_Plugin::$session->count): ?><a href="#next" class="next_element">&nbsp;</a><?php else: ?><span class="next_element">&nbsp;</span><?php endif ?>
10 </div>
11 </div>
12
13 <div class="wpallimport-preview-content">
14 <?php if ($this->errors->get_error_codes()): ?>
15 <?php $this->error() ?>
16 <?php endif ?>
17
18 <h3><?php esc_html_e('Test Taxonomies Hierarchy', 'wp-all-import'); ?></h3>
19
20 <?php
21 if ( ! empty($tax_hierarchical) ):
22 foreach ($tax_hierarchical as $ctx => $terms_arr):
23 $tax_info = get_taxonomy($ctx);
24 ?>
25 <p><?php echo esc_html($tax_info->labels->name); ?></p>
26 <?php
27 if (!empty($terms_arr) and is_array($terms_arr)){
28 foreach ($terms_arr as $terms) {
29
30 $terms = wp_all_import_filter_html_kses($terms);
31
32 // Apply mapping before splitting via separator symbol
33 if (! empty($post['tax_enable_mapping'][$ctx]) and !empty($post['tax_logic_mapping'][$ctx])){
34 $mapping_rules = json_decode($post['tax_mapping'][$ctx], true);
35 if ( ! empty( $mapping_rules) ){
36 foreach ($mapping_rules as $rule) {
37 if ( ! empty($rule[trim($terms)])){
38 $terms = trim($rule[trim($terms)]);
39 break;
40 }
41 }
42 }
43 }
44
45 $terms_a = ( ! empty($post['tax_hierarchical_delim'][$ctx])) ? explode($post['tax_hierarchical_delim'][$ctx], $terms) : explode(',', $terms);
46
47 if ( ! empty($terms_a) and is_array($terms_a)){
48 foreach ($terms_a as $lvl => $term) {
49 if ( ! empty($post['tax_mapping'][$ctx]) and empty($post['tax_logic_mapping'][$ctx])){
50 $mapping_rules = json_decode($post['tax_mapping'][$ctx], true);
51 if ( ! empty($mapping_rules) ){
52 foreach ($mapping_rules as $rule_number => $rule) {
53 if ( ! empty($rule[trim($term)])){
54 $term = trim($rule[trim($term)]);
55 break;
56 }
57 }
58 }
59 }
60 if (!empty($term)) {
61 ?>
62 <p><?php echo esc_html(str_pad(trim($term), strlen(trim($term)) + $lvl, "-", STR_PAD_LEFT)); ?></p>
63 <?php
64 }
65 }
66 }
67 else{
68 ?>
69 <p><?php echo esc_html($terms_a); ?></p>
70 <?php
71 }
72 }
73 }
74
75 endforeach;
76 endif; ?>
77 </div>
78
79 </div>