Code Duplication    Length = 6-7 lines in 4 locations

ui/fields/checkbox.php 1 location

@@ 20-25 (lines=6) @@
17
	$primary_id   = 'pods-form-ui-' . PodsForm::clean( $name );
18
19
	foreach ( $options['data'] as $val => $label ) {
20
		if ( is_array( $label ) ) {
21
			if ( isset( $label['label'] ) ) {
22
				$label = $label['label'];
23
			} else {
24
				$label = $val;
25
			}
26
		}
27
28
		$attributes = array();

ui/fields/radio.php 1 location

@@ 17-22 (lines=6) @@
14
$selection_made = false;
15
16
foreach ( $options['data'] as $val => $label ) {
17
	if ( is_array( $label ) ) {
18
		if ( isset( $label['label'] ) ) {
19
			$label = $label['label'];
20
		} else {
21
			$label = $val;
22
		}
23
	}
24
25
	$attributes = array();

includes/general.php 1 location

@@ 475-481 (lines=7) @@
472
		wp_enqueue_script( 'pods-qtip-init' );
473
	}
474
475
	if ( is_array( $text ) ) {
476
		if ( isset( $text[ 1 ] ) ) {
477
			$url = $text[ 1 ];
478
		}
479
480
		$text = $text[ 0 ];
481
	}
482
483
	if ( 'help' == $text ) {
484
		return;

deprecated/classes/Pods.php 1 location

@@ 387-392 (lines=6) @@
384
			foreach ( $fields as $k => $field ) {
385
				$name = $k;
386
387
				if ( ! is_array( $field ) ) {
388
					$name  = $field;
389
					$field = array();
390
				} elseif ( isset( $field['name'] ) ) {
391
					$name = $field['name'];
392
				}
393
394
				if ( in_array(
395
					$name, array(