| @@ -1,48 +1,33 @@ | ||
| 1 | -<?php | |
| 2 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | - die( 'You are not allowed to call this page directly.' ); | |
| 4 | -} | |
| 1 | +<?php the_generator( 'export' ); ?> | |
| 5 | 2 | |
| 6 | -the_generator( 'export' ); | |
| 7 | -?> | |
| 8 | - | |
| 9 | 3 | <channel> |
| 10 | 4 | <title><?php bloginfo_rss( 'name' ); ?></title> |
| 11 | - <pubDate><?php echo esc_html( gmdate( 'D, d M Y H:i:s +0000' ) ); ?></pubDate> | |
| 5 | + <pubDate><?php echo date( 'D, d M Y H:i:s +0000' ); ?></pubDate> | |
| 6 | + <base_blog_url><?php bloginfo_rss( 'url' ); ?></base_blog_url> | |
| 12 | 7 | |
| 13 | 8 | <?php |
| 14 | -/** | |
| 15 | - * @since 5.3 | |
| 16 | - */ | |
| 17 | -do_action( 'frm_xml_export_before_types_loop' ); | |
| 9 | +foreach($type as $tb_type){ | |
| 10 | + | |
| 11 | + if(!isset($tables[$tb_type])){ | |
| 12 | + do_action('frm_xml_import_'. $tb_type, $args); | |
| 13 | + continue; | |
| 14 | + } | |
| 15 | + | |
| 16 | + //no records | |
| 17 | + if(!isset($records[$tb_type])) | |
| 18 | + continue; | |
| 18 | 19 | |
| 19 | -foreach ( $type as $tb_type ) { | |
| 20 | - if ( ! isset( $tables[ $tb_type ] ) ) { | |
| 21 | - do_action( 'frm_xml_import_' . $tb_type, $args ); | |
| 22 | - continue; | |
| 23 | - } | |
| 20 | + $item_ids = $records[$tb_type]; | |
| 21 | + if ( file_exists(dirname(__FILE__) .'/'. $tb_type .'_xml.php') ) { | |
| 22 | + include(dirname(__FILE__) .'/'. $tb_type .'_xml.php'); | |
| 23 | + } else if ( file_exists( FrmAppHelper::plugin_path() .'/pro/classes/views/xml/'. $tb_type .'_xml.php') ){ | |
| 24 | + include( FrmAppHelper::plugin_path() .'/pro/classes/views/xml/'. $tb_type .'_xml.php' ); | |
| 25 | + } | |
| 26 | + unset($item_ids); | |
| 27 | + unset($records[$tb_type]); | |
| 28 | + | |
| 29 | + unset($tb_type); | |
| 30 | +} | |
| 24 | 31 | |
| 25 | - if ( ! isset( $records[ $tb_type ] ) ) { | |
| 26 | - // No records. | |
| 27 | - continue; | |
| 28 | - } | |
| 29 | - | |
| 30 | - $item_ids = $records[ $tb_type ]; | |
| 31 | - | |
| 32 | - if ( in_array( $tb_type, array( 'styles', 'actions' ), true ) ) { | |
| 33 | - include __DIR__ . '/posts_xml.php'; | |
| 34 | - } elseif ( file_exists( __DIR__ . '/' . $tb_type . '_xml.php' ) ) { | |
| 35 | - include __DIR__ . '/' . $tb_type . '_xml.php'; | |
| 36 | - } elseif ( FrmAppHelper::pro_is_installed() && file_exists( FrmProAppHelper::plugin_path() . '/classes/views/xml/' . $tb_type . '_xml.php' ) ) { | |
| 37 | - include FrmProAppHelper::plugin_path() . '/classes/views/xml/' . $tb_type . '_xml.php'; | |
| 38 | - } | |
| 39 | - | |
| 40 | - unset( $item_ids, $records[ $tb_type ], $tb_type ); | |
| 41 | -}//end foreach | |
| 42 | - | |
| 43 | -/** | |
| 44 | - * @since 5.3 | |
| 45 | - */ | |
| 46 | -do_action( 'frm_xml_export_after_types_loop' ); | |
| 47 | 32 | ?> |
| 48 | -</channel> | |
| 33 | +</channel> | |