| @@ -10,39 +10,30 @@ | ||
| 10 | 10 | <title><?php bloginfo_rss( 'name' ); ?></title> |
| 11 | 11 | <pubDate><?php echo esc_html( gmdate( 'D, d M Y H:i:s +0000' ) ); ?></pubDate> |
| 12 | 12 | |
| 13 | 13 | <?php |
| 14 | -/** | |
| 15 | - * @since 5.3 | |
| 16 | - */ | |
| 17 | -do_action( 'frm_xml_export_before_types_loop' ); | |
| 14 | +foreach ( $type as $tb_type ) { | |
| 18 | 15 | |
| 19 | -foreach ( $type as $tb_type ) { | |
| 20 | 16 | if ( ! isset( $tables[ $tb_type ] ) ) { |
| 21 | 17 | do_action( 'frm_xml_import_' . $tb_type, $args ); |
| 22 | 18 | continue; |
| 23 | 19 | } |
| 24 | 20 | |
| 21 | + //no records | |
| 25 | 22 | if ( ! isset( $records[ $tb_type ] ) ) { |
| 26 | - // No records. | |
| 27 | 23 | continue; |
| 28 | 24 | } |
| 29 | 25 | |
| 30 | 26 | $item_ids = $records[ $tb_type ]; |
| 31 | - | |
| 32 | 27 | 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'; | |
| 28 | + include( dirname( __FILE__ ) . '/posts_xml.php' ); | |
| 29 | + } elseif ( file_exists( dirname( __FILE__ ) . '/' . $tb_type . '_xml.php' ) ) { | |
| 30 | + include( dirname( __FILE__ ) . '/' . $tb_type . '_xml.php' ); | |
| 36 | 31 | } 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'; | |
| 32 | + include( FrmProAppHelper::plugin_path() . '/classes/views/xml/' . $tb_type . '_xml.php' ); | |
| 38 | 33 | } |
| 39 | 34 | |
| 40 | 35 | unset( $item_ids, $records[ $tb_type ], $tb_type ); |
| 41 | -}//end foreach | |
| 36 | +} | |
| 42 | 37 | |
| 43 | -/** | |
| 44 | - * @since 5.3 | |
| 45 | - */ | |
| 46 | -do_action( 'frm_xml_export_after_types_loop' ); | |
| 47 | 38 | ?> |
| 48 | 39 | </channel> |