PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
plugins
/
wp-all-import-pro
/
helpers
<?php /** * * Get parent category term ID * * @param $parent * @param $tx_name * @param $txes * @param $key * @return int */ function pmxi_recursion_taxes($parent, $tx_name, $txes, $key, $do_not_create_terms = 0){ if ( is_array($parent) ){ if ( empty($parent['parent']) ){ $term = is_exists_term($parent['name'], $tx_name, 0); if ( empty($term) and !is_wp_error($term) ){ $term = is_exists_term(htmlspecialchars($parent['name']), $tx_name, 0); if ( empty($do_not_create_terms) && empty($term) && !is_wp_error($term) ){ $term = wp_insert_term( $parent['name'], // the term $tx_name // the taxonomy ); } } return ( ! empty($term) and ! is_wp_error($term)) ? $term['term_id'] : 0; } else{ $parent_id = pmxi_recursion_taxes($parent['parent'], $tx_name, $txes, $key, $do_not_create_terms); if (empty($parent['name'])) return $parent_id; $term = is_exists_term($parent['name'], $tx_name, (int)$parent_id); if ( empty($term) and !is_wp_error($term) ){ $term = is_exists_term(htmlspecialchars($parent['name']), $tx_name, (int)$parent_id); if ( empty($do_not_create_terms) && empty($term) && !is_wp_error($term) ){ $term = wp_insert_term( $parent['name'], // the term $tx_name, // the taxonomy array('parent'=> (!empty($parent_id)) ? (int)$parent_id : 0) ); } } return ( ! empty($term) and ! is_wp_error($term)) ? $term['term_id'] : 0; } } else{ if ( !empty($txes[$key - 1]) and !empty($txes[$key - 1]['parent']) and $parent != $txes[$key - 1]['parent']) { $parent_id = pmxi_recursion_taxes($txes[$key - 1]['parent'], $tx_name, $txes, $key - 1, $do_not_create_terms); $term = is_exists_term($parent, $tx_name, (int)$parent_id); if ( empty($term) and ! is_wp_error($term) ){ $term = is_exists_term(htmlspecialchars($parent), $tx_name, (int)$parent_id); if ( empty($do_not_create_terms) && empty($term) && !is_wp_error($term) ){ $term = wp_insert_term( $parent, // the term $tx_name, // the taxonomy array('parent'=> (!empty($parent_id)) ? (int)$parent_id : 0) ); } } return ( ! empty($term) and ! is_wp_error($term) ) ? $term['term_id'] : 0; } else{ $term = is_exists_term($parent, $tx_name); if ( empty($term) and !is_wp_error($term) ){ $term = is_exists_term(htmlspecialchars($parent), $tx_name); if ( empty($term) and !is_wp_error($term) ){ $term = wp_insert_term( $parent, // the term $tx_name // the taxonomy ); } } return ( ! empty($term) and ! is_wp_error($term)) ? $term['term_id'] : 0; } } }
[-] wp_all_import_get_import_post_type.php
[edit]
[-] wp_all_import_addon_notifications.php
[edit]
[-] wp_all_import_get_parent_terms.php
[edit]
[-] wp_all_import_is_base64_encoded.php
[edit]
[-] wp_all_import_sanitize_scheduling_times.php
[edit]
[-] get_file_curl.php
[edit]
[-] wpai_preview_cleanup.php
[edit]
[-] wp_all_import_filter_html_kses.php
[edit]
[-] is_exists_term.php
[edit]
[-] wp_all_import_get_url.php
[edit]
[-] wp_all_import_remove_source.php
[edit]
[-] wp_all_import_xml2array.php
[edit]
[-] wp_all_import_get_reader_engine.php
[edit]
[-] wp_redirect_or_javascript.php
[edit]
[-] str_getcsv.php
[edit]
[-] pmxi_recursion_taxes.php
[edit]
[-] wp_all_import_sanitize_svg.php
[edit]
[-] wp_all_import_custom_type.php
[edit]
[-] functions.php
[edit]
[-] wp_all_import_base64_decode_image.php
[edit]
[-] wp_all_import_get_gz.php
[edit]
[-] wp_all_import_is_update_cf.php
[edit]
[-] wp_all_import_rand_char.php
[edit]
[-] pmxi_findDuplicates.php
[edit]
[-] wp_all_import_template_notifications.php
[edit]
[-] wp_all_import_get_image_from_gallery.php
[edit]
[-] wp_all_import_is_json.php
[edit]
[-] wp_all_import_json_to_xml.php
[edit]
[-] wp_all_import_sanitize_filename.php
[edit]
[-] wp_all_import_ctx_mapping.php
[edit]
[-] wp_all_import_clear_directory.php
[edit]
[-] wp_all_import_get_import_id.php
[edit]
[-] wp_delete_attachments.php
[edit]
[-] import_custom_meta_box.php
[edit]
[-] wp_all_import_get_page_by_title.php
[edit]
[-] class-pmxi-template-processor.php
[edit]
[-] wp_all_import_get_parent_post.php
[edit]
[-] wp_all_import_get_pmxi_post_query.php
[edit]
[-] wp_all_import_is_title_required.php
[edit]
[-] wpai_util_map.php
[edit]
[-] get_taxonomies_by_object_type.php
[edit]
[+]
..
[-] reverse_taxonomies_html.php
[edit]
[-] wp_all_import_sanitize_url.php
[edit]
[-] wp_all_import_strip_tags_content.php
[edit]
[-] wp_all_import_rmdir.php
[edit]
[-] wp_all_import_secure_file.php
[edit]
[-] wp_all_import_get_feed_type.php
[edit]
[-] wp_all_import_url_title.php
[edit]
[-] backward.php
[edit]