in_the_loop = true; // Fake being in the loop.
// fetch 20 posts at a time rather than loading the entire table into memory
while ( $next_posts = array_splice( $item_ids, 0, 20 ) ) {
$posts = FrmDb::get_results( $wpdb->posts, array( 'ID' => $next_posts ) );
// Begin Loop
foreach ( $posts as $post ) {
setup_postdata( $post );
$is_sticky = is_sticky( $post->ID ) ? 1 : 0;
?>
post_title ) ); ?>
post_content ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
post_excerpt ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
ID ); ?>
post_date ); ?>
post_date_gmt ); ?>
comment_status ); ?>
ping_status ); ?>
post_name ); ?>
post_status ); ?>
post_parent ); ?>
menu_order ); ?>
post_type ); ?>
post_password ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
post_type ) : ?>
ID ) ); ?>
postmeta, array( 'post_id' => $post->ID ) );
foreach ( $postmeta as $meta ) :
if ( apply_filters( 'wxr_export_skip_postmeta', false, $meta->meta_key, $meta ) ) {
continue;
}
?>
meta_key ); ?>
meta_value ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
post_type );
if ( ! empty( $taxonomies ) ) {
$terms = wp_get_object_terms( $post->ID, $taxonomies );
foreach ( (array) $terms as $term ) {
?>
name ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
post_type && is_callable( 'FrmViewsLayout::get_layouts_for_view' ) ) {
$layouts = FrmViewsLayout::get_layouts_for_view( $post->ID );
foreach ( $layouts as $layout ) {
?>
type ); ?>
data ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
term_id, $frm_inc_tax, true ) ) {
return;
}
$frm_inc_tax[] = $term->term_id;
$label = ( 'category' === $term->taxonomy || 'tag' === $term->taxonomy ) ? $term->taxonomy : 'term';
?>
term_id ); ?>taxonomy ); ?>name ) ) {
echo '' . FrmXMLHelper::cdata( $term->name ) . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
if ( ! empty( $term->description ) ) {
echo '' . FrmXMLHelper::cdata( $term->description ) . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
echo '' . esc_html( $term->slug ) . '';
echo '';
}