backward.php
12 years ago
get_taxonomies_by_object_type.php
10 years ago
pmxe_filter.php
8 years ago
pmxe_functions.php
5 years ago
pmxe_prepare_price.php
8 years ago
pmxe_render_xml_attributes.php
9 years ago
pmxe_render_xml_element.php
8 years ago
pmxe_render_xml_text.php
8 years ago
str_getcsv.php
12 years ago
wp_all_export_check_children_assign.php
10 years ago
wp_all_export_clear_xss.php
4 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
10 years ago
wp_all_export_parse_field_name.php
9 years ago
wp_all_export_posts_join.php
10 years ago
wp_all_export_posts_where.php
8 years ago
wp_all_export_pre_user_query.php
7 years ago
wp_all_export_prepare_template_csv.php
7 years ago
wp_all_export_prepare_template_xml.php
7 years ago
wp_all_export_rand_char.php
10 years ago
wp_all_export_remove_colons.php
10 years ago
wp_all_export_remove_source.php
10 years ago
wp_all_export_reverse_rules_html.php
8 years ago
wp_all_export_rmdir.php
10 years ago
wp_all_export_secure_file.php
9 years ago
wp_all_export_url_title.php
10 years ago
wp_all_export_write_article.php
10 years ago
wp_redirect_or_javascript.php
12 years ago
wp_all_export_generate_export_file.php
37 lines
| 1 | <?php |
| 2 | if ( ! function_exists('wp_all_export_generate_export_file') ) |
| 3 | { |
| 4 | function wp_all_export_generate_export_file( $export_id ) |
| 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 | { |
| 18 | if($export->options['export_to'] == XmlExportEngine::EXPORT_TYPE_XML && |
| 19 | $export->options['xml_template_type'] == XmlExportEngine::EXPORT_TYPE_GOOLE_MERCHANTS) { |
| 20 | $extension = \Wpae\App\Service\ExportGoogleMerchants::GOOGLE_MERCHANTS_EXTENSION; |
| 21 | } else { |
| 22 | $extension = $export->options['export_to']; |
| 23 | } |
| 24 | |
| 25 | if ( $export->options['creata_a_new_export_file'] ) |
| 26 | { |
| 27 | $export_file_name = sanitize_file_name($export->friendly_name) . '-' . ($export->iteration + 1) . '.' . $extension; |
| 28 | } |
| 29 | else |
| 30 | { |
| 31 | $export_file_name = sanitize_file_name($export->friendly_name) . '.' . $extension; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | return apply_filters('wp_all_export_export_file_name', $target . DIRECTORY_SEPARATOR . $export_file_name, $export_id ); |
| 36 | } |
| 37 | } |