Code Duplication    Length = 16-18 lines in 2 locations

includes/data.php 2 locations

@@ 1379-1394 (lines=16) @@
1376
 * @version 2.0
1377
 */
1378
function pods_str_replace ( $find, $replace, $string, $occurrences = -1 ) {
1379
    if ( is_array( $string ) ) {
1380
        foreach ( $string as $k => $v ) {
1381
            $string[ $k ] = pods_str_replace( $find, $replace, $v, $occurrences );
1382
        }
1383
1384
        return $string;
1385
    }
1386
    elseif ( is_object( $string ) ) {
1387
        $string = get_object_vars( $string );
1388
1389
        foreach ( $string as $k => $v ) {
1390
            $string[ $k ] = pods_str_replace( $find, $replace, $v, $occurrences );
1391
        }
1392
1393
        return (object) $string;
1394
    }
1395
1396
    if ( is_array( $find ) ) {
1397
        foreach ( $find as &$f ) {
@@ 1462-1479 (lines=18) @@
1459
 */
1460
function pods_evaluate_tags ( $tags, $sanitize = false ) {
1461
1462
	if ( is_array( $tags ) ) {
1463
		foreach ( $tags as $k => $tag ) {
1464
			$tags[ $k ] = pods_evaluate_tags( $tag, $sanitize );
1465
		}
1466
1467
		return $tags;
1468
	}
1469
	elseif ( is_object( $tags ) ) {
1470
		$tags = get_object_vars( $tags );
1471
1472
		foreach ( $tags as $k => $tag ) {
1473
			$tags[ $k ] = pods_evaluate_tags( $tag, $sanitize );
1474
		}
1475
1476
		$tags = (object) $tags;
1477
1478
		return $tags;
1479
	}
1480
1481
	$callback = 'pods_evaluate_tag';
1482