Code Duplication    Length = 5-6 lines in 2 locations

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

@@ 360-364 (lines=5) @@
357
				// Custom attribute handling.
358
				$custom_attributes = array();
359
360
				if ( ! empty( $value['attributes'] ) && is_array( $value['attributes'] ) ) {
361
					foreach ( $value['attributes'] as $attribute => $attribute_value ) {
362
						$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
363
					}
364
				}
365
366
				// Description handling.
367
				$description = self::get_field_description( $value );

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

@@ 532-537 (lines=6) @@
529
	// Custom attribute handling
530
	$custom_attributes = array();
531
532
	if ( ! empty( $field['attributes'] ) && is_array( $field['attributes'] ) ) {
533
534
		foreach ( $field['attributes'] as $attribute => $value ) {
535
			$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $value ) . '"';
536
		}
537
	}
538
	?>
539
540
	<input