| @@ -18,9 +18,9 @@ | ||
| 18 | 18 | global $wp_query; |
| 19 | 19 | // Fake being in the loop. |
| 20 | 20 | $wp_query->in_the_loop = true; |
| 21 | 21 | |
| 22 | -// fetch 20 posts at a time rather than loading the entire table into memory | |
| 22 | +// Fetch 20 posts at a time rather than loading the entire table into memory | |
| 23 | 23 | while ( $next_posts = array_splice( $item_ids, 0, 20 ) ) { |
| 24 | 24 | $posts = FrmDb::get_results( $wpdb->posts, array( 'ID' => $next_posts ) ); |
| 25 | 25 | |
| 26 | 26 | // Begin Loop |
| @@ -67,9 +67,9 @@ | ||
| 67 | 67 | endforeach; |
| 68 | 68 | |
| 69 | 69 | $taxonomies = get_object_taxonomies( $post->post_type ); |
| 70 | 70 | |
| 71 | - if ( ! empty( $taxonomies ) ) { | |
| 71 | + if ( $taxonomies ) { | |
| 72 | 72 | $terms = wp_get_object_terms( $post->ID, $taxonomies ); |
| 73 | 73 | |
| 74 | 74 | foreach ( (array) $terms as $term ) { |
| 75 | 75 | ?> |
| @@ -103,9 +103,9 @@ | ||
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | global $frm_inc_tax; |
| 106 | 106 | |
| 107 | -if ( empty( $frm_inc_tax ) ) { | |
| 107 | +if ( ! $frm_inc_tax ) { | |
| 108 | 108 | $frm_inc_tax = array(); |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | $parent_slugs = FrmXMLController::get_parent_terms_slugs( $terms ); |
| @@ -115,9 +115,8 @@ | ||
| 115 | 115 | continue; |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | $frm_inc_tax[] = $term->term_id; |
| 119 | - $label = 'category' === $term->taxonomy || 'tag' === $term->taxonomy ? $term->taxonomy : 'term'; | |
| 120 | 119 | ?> |
| 121 | 120 | <term><term_id><?php echo esc_html( $term->term_id ); ?></term_id><term_taxonomy><?php echo esc_html( $term->taxonomy ); ?></term_taxonomy><?php |
| 122 | 121 | if ( ! empty( $parent_slugs[ $term->parent ] ) ) { |
| 123 | 122 | echo '<term_parent>' . esc_html( $parent_slugs[ $term->parent ] ) . '</term_parent>'; |