Code Duplication    Length = 2-7 lines in 4 locations

includes/data.php 1 location

@@ 1563-1569 (lines=7) @@
1560
	global $wpdb;
1561
1562
	// Handle pods_evaluate_tags
1563
	if ( is_array( $tag ) ) {
1564
		if ( !isset( $tag[ 2 ] ) && strlen( trim( $tag[ 2 ] ) ) < 1 ) {
1565
			return '';
1566
		}
1567
1568
		$tag = $tag[ 2 ];
1569
	}
1570
1571
	$tag = trim( $tag, ' {@}' );
1572
	$tag = explode( '.', $tag );

classes/Pods.php 1 location

@@ 3595-3600 (lines=6) @@
3592
	 */
3593
	private function process_magic_tags ( $tag ) {
3594
3595
		if ( is_array( $tag ) ) {
3596
			if ( !isset( $tag[ 2 ] ) && strlen( trim( $tag[ 2 ] ) ) < 1 )
3597
				return '';
3598
3599
			$tag = $tag[ 2 ];
3600
		}
3601
3602
		$tag = trim( $tag, ' {@}' );
3603
		$tag = explode( ',', $tag );

classes/fields/file.php 1 location

@@ 462-463 (lines=2) @@
459
            $title = false;
460
461
            if ( is_array( $id ) ) {
462
                if ( isset( $id[ 'title' ] ) && 0 < strlen( trim( $id[ 'title' ] ) ) )
463
                    $title = trim( $id[ 'title' ] );
464
465
                if ( isset( $id[ 'id' ] ) )
466
                    $id = (int) $id[ 'id' ];

classes/PodsUI.php 1 location

@@ 4127-4132 (lines=6) @@
4124
     * @return string
4125
     */
4126
    public function do_magic_tags ( $tag ) {
4127
        if ( is_array( $tag ) ) {
4128
            if ( !isset( $tag[ 2 ] ) && strlen( trim( $tag[ 2 ] ) ) < 1 )
4129
                return '';
4130
4131
            $tag = $tag[ 2 ];
4132
        }
4133
4134
        $tag = trim( $tag, ' {@}' );
4135
        $tag = explode( ',', $tag );