Code Duplication    Length = 11-11 lines in 2 locations

wp-includes/class-wp-customize-nav-menus.php 2 locations

@@ 200-210 (lines=11) @@
197
				return $terms;
198
			}
199
200
			foreach ( $terms as $term ) {
201
				$items[] = array(
202
					'id'         => "term-{$term->term_id}",
203
					'title'      => html_entity_decode( $term->name, ENT_QUOTES, get_bloginfo( 'charset' ) ),
204
					'type'       => 'taxonomy',
205
					'type_label' => get_taxonomy( $term->taxonomy )->labels->singular_name,
206
					'object'     => $term->taxonomy,
207
					'object_id'  => intval( $term->term_id ),
208
					'url'        => get_term_link( intval( $term->term_id ), $term->taxonomy ),
209
				);
210
			}
211
		}
212
213
		/**
@@ 324-334 (lines=11) @@
321
322
		// Check if any taxonomies were found.
323
		if ( ! empty( $terms ) ) {
324
			foreach ( $terms as $term ) {
325
				$items[] = array(
326
					'id'         => 'term-' . $term->term_id,
327
					'title'      => html_entity_decode( $term->name, ENT_QUOTES, get_bloginfo( 'charset' ) ),
328
					'type'       => 'taxonomy',
329
					'type_label' => get_taxonomy( $term->taxonomy )->labels->singular_name,
330
					'object'     => $term->taxonomy,
331
					'object_id'  => intval( $term->term_id ),
332
					'url'        => get_term_link( intval( $term->term_id ), $term->taxonomy ),
333
				);
334
			}
335
		}
336
337
		/**