Code Duplication    Length = 5-6 lines in 2 locations

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

@@ 304-309 (lines=6) @@
301
	// Custom attribute handling
302
	$custom_attributes = array();
303
304
	if ( ! empty( $field['attributes'] ) && is_array( $field['attributes'] ) ) {
305
306
		foreach ( $field['attributes'] as $attribute => $value ) {
307
			$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $value ) . '"';
308
		}
309
	}
310
	?>
311
312
	<input

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

@@ 347-351 (lines=5) @@
344
				// Custom attribute handling.
345
				$custom_attributes = array();
346
347
				if ( ! empty( $value['attributes'] ) && is_array( $value['attributes'] ) ) {
348
					foreach ( $value['attributes'] as $attribute => $attribute_value ) {
349
						$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
350
					}
351
				}
352
353
				// Description handling.
354
				$description          = self::get_field_description( $value );