backward.php
8 years ago
get_taxonomies_by_object_type.php
8 years ago
pmxe_filter.php
8 years ago
pmxe_functions.php
8 years ago
pmxe_render_xml_attributes.php
8 years ago
pmxe_render_xml_element.php
8 years ago
pmxe_render_xml_text.php
8 years ago
str_getcsv.php
8 years ago
wp_all_export_check_children_assign.php
8 years ago
wp_all_export_generate_export_file.php
8 years ago
wp_all_export_get_cpt_name.php
8 years ago
wp_all_export_get_export_format.php
8 years ago
wp_all_export_is_compatible.php
8 years ago
wp_all_export_parse_field_name.php
8 years ago
wp_all_export_posts_join.php
8 years ago
wp_all_export_posts_where.php
8 years ago
wp_all_export_prepare_template_csv.php
8 years ago
wp_all_export_prepare_template_xml.php
8 years ago
wp_all_export_rand_char.php
8 years ago
wp_all_export_remove_colons.php
8 years ago
wp_all_export_remove_source.php
8 years ago
wp_all_export_reverse_rules_html.php
8 years ago
wp_all_export_rmdir.php
8 years ago
wp_all_export_secure_file.php
8 years ago
wp_all_export_url_title.php
8 years ago
wp_all_export_write_article.php
8 years ago
wp_redirect_or_javascript.php
8 years ago
wp_all_export_generate_export_file.php
29 lines
| 1 | <?php |
| 2 | if (!function_exists('wp_all_export_generate_export_file')) { |
| 3 | function wp_all_export_generate_export_file($export_id) |
| 4 | { |
| 5 | |
| 6 | $is_secure_import = PMXE_Plugin::getInstance()->getOption('secure'); |
| 7 | |
| 8 | $wp_uploads = wp_upload_dir(); |
| 9 | |
| 10 | $target = $is_secure_import ? wp_all_export_secure_file($wp_uploads['basedir'] . DIRECTORY_SEPARATOR . PMXE_Plugin::UPLOADS_DIRECTORY, $export_id) : $wp_uploads['path']; |
| 11 | |
| 12 | $export = new PMXE_Export_Record(); |
| 13 | |
| 14 | $export->getById($export_id); |
| 15 | |
| 16 | if (!$export->isEmpty()) { |
| 17 | $extension = $export->options['export_to']; |
| 18 | |
| 19 | if ($export->options['creata_a_new_export_file']) { |
| 20 | $export_file_name = sanitize_file_name($export->friendly_name) . '-' . ($export->iteration + 1) . '.' . $extension; |
| 21 | } else { |
| 22 | $export_file_name = sanitize_file_name($export->friendly_name) . '.' . $extension; |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | return apply_filters('wp_all_export_export_file_name', $target . DIRECTORY_SEPARATOR . $export_file_name, $export_id); |
| 27 | |
| 28 | } |
| 29 | } |