name, $ignore)) { continue; } if ( ! empty($taxonomy->labels->name) && strpos($taxonomy->labels->name, "_") === false){ $r[$taxonomy->name] = $taxonomy->labels->name; } else{ $r[$taxonomy->name] = empty($taxonomy->labels->singular_name) ? $taxonomy->name : $taxonomy->labels->singular_name; } } asort($r, SORT_FLAG_CASE | SORT_STRING); // return return $r; } } if ( ! function_exists('wp_all_import_is_password_protected_feed')){ function wp_all_import_is_password_protected_feed($url){ $url_data = parse_url($url); return (!empty($url_data['user']) and !empty($url_data['pass'])) ? true : false; } } if ( ! function_exists('wp_all_import_cmp_custom_types')){ function wp_all_import_cmp_custom_types($a, $b) { return strcmp($a->labels->name, $b->labels->name); } } if ( ! function_exists('wp_all_import_basename')) { function wp_all_import_basename($file) { $a = explode('/', $file); return end($a); } } if ( ! function_exists('wp_all_import_update_post_count')) { function wp_all_import_update_post_count() { global $wpdb; update_option( 'post_count', (int) $wpdb->get_var( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_status = 'publish' and post_type = 'post'" ) ); } }