HEX
Server: LiteSpeed
System: Linux server358.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User: alfoxtfy (2915)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/alfoxtfy/www/wp-content/plugins/wp-all-import/helpers/reverse_taxonomies_html.php
<?php

if ( ! function_exists('reverse_taxonomies_html') ) {

	function reverse_taxonomies_html($post_taxonomies, $item_id, &$i, $ctx_name = '', $entry = ''){
		$childs = array();
		foreach ($post_taxonomies as $j => $cat) if ($cat->parent_id == $item_id and $cat->item_id != $item_id) { $childs[] = $cat; }
		
		if (!empty($childs)){
			?>
			<ol>
			<?php
			foreach ($childs as $child_cat){
				$i++;
				?>
	            <li id="item_<?php echo esc_attr($i); ?>" class="dragging">
	            	<div class="drag-element">
	            		<input type="hidden" class="assign_term" value="1" />
	            		<input class="widefat xpath_field" type="text" value="<?php echo esc_textarea($child_cat->xpath); ?>"/>	            		
	            		<?php do_action('pmxi_category_view', $cat, $i, $ctx_name, $entry); ?>
	            	</div>
	            	<a href="javascript:void(0);" class="icon-item remove-ico"></a>
	            	<?php echo reverse_taxonomies_html($post_taxonomies, $child_cat->item_id, $i, $ctx_name, $entry); ?>
	            </li>
				<?php
			}
			?>
			</ol>
			<?php
		}
	}
}