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/fields/file.php 1 location

@@ 647-648 (lines=2) @@
644
			$title = false;
645
646
			if ( is_array( $id ) ) {
647
				if ( isset( $id['title'] ) && 0 < strlen( trim( $id['title'] ) ) ) {
648
					$title = trim( $id['title'] );
649
				}
650
651
				if ( isset( $id['id'] ) ) {

classes/Pods.php 1 location

@@ 3604-3609 (lines=6) @@
3601
	 */
3602
	private function process_magic_tags ( $tag ) {
3603
3604
		if ( is_array( $tag ) ) {
3605
			if ( !isset( $tag[ 2 ] ) && strlen( trim( $tag[ 2 ] ) ) < 1 )
3606
				return '';
3607
3608
			$tag = $tag[ 2 ];
3609
		}
3610
3611
		$tag = trim( $tag, ' {@}' );
3612
		$tag = explode( ',', $tag );

classes/PodsUI.php 1 location

@@ 4144-4149 (lines=6) @@
4141
     * @return string
4142
     */
4143
    public function do_magic_tags ( $tag ) {
4144
        if ( is_array( $tag ) ) {
4145
            if ( !isset( $tag[ 2 ] ) && strlen( trim( $tag[ 2 ] ) ) < 1 )
4146
                return '';
4147
4148
            $tag = $tag[ 2 ];
4149
        }
4150
4151
        $tag = trim( $tag, ' {@}' );
4152
        $tag = explode( ',', $tag );