Code Duplication    Length = 9-9 lines in 2 locations

includes/admin/give-metabox-functions.php 1 location

@@ 357-365 (lines=9) @@
354
			<?php echo "{$type} {$allow_new_values} {$placeholder}"; ?>
355
		>
356
			<?php
357
			if ( is_array( $title_prefixes_value ) && count( $title_prefixes_value ) > 0 ) {
358
				foreach ( $title_prefixes_value as $key => $value ) {
359
					echo sprintf(
360
						'<option %1$s value="%2$s">%2$s</option>',
361
						( 'selected' === $value ) ? 'selected="selected"' : '',
362
						esc_attr( $key )
363
					);
364
				}
365
			}
366
			?>
367
		</select>
368
		<?php echo esc_attr( $field['after_field'] ); ?>

includes/admin/class-admin-settings.php 1 location

@@ 847-855 (lines=9) @@
844
									?>
845
								>
846
									<?php
847
									if ( is_array( $title_prefixes_value ) && count( $title_prefixes_value ) > 0 ) {
848
										foreach ( $title_prefixes_value as $key => $item_value ) {
849
											echo sprintf(
850
												'<option %1$s value="%2$s">%2$s</option>',
851
												( 'selected' === $item_value ) ? 'selected="selected"' : '',
852
												esc_attr( $key )
853
											);
854
										}
855
									}
856
									?>
857
								</select>
858
								<?php echo wp_kses_post( $description ); ?>