Code Duplication    Length = 5-5 lines in 3 locations

classes/PodsAPI.php 2 locations

@@ 5270-5274 (lines=5) @@
5267
        $load_fields = true;
5268
5269
        // WPML support
5270
        if ( is_object( $sitepress ) && !$icl_adjust_id_url_filter_off )
5271
            $current_language = pods_sanitize( ICL_LANGUAGE_CODE );
5272
        // Polylang support
5273
        elseif ( function_exists( 'pll_current_language' ) )
5274
            $current_language = pll_current_language( 'slug' );
5275
5276
        if ( !is_array( $params ) && !is_object( $params ) )
5277
            $params = array( 'name' => $params, 'table_info' => false, 'fields' => true );
@@ 5541-5545 (lines=5) @@
5538
        $current_language = false;
5539
5540
        // WPML support
5541
        if ( is_object( $sitepress ) && !$icl_adjust_id_url_filter_off )
5542
            $current_language = pods_sanitize( ICL_LANGUAGE_CODE );
5543
        // Polylang support
5544
        elseif ( function_exists( 'pll_current_language' ) )
5545
            $current_language = pll_current_language( 'slug' );
5546
5547
        $params = (object) pods_sanitize( $params );
5548

classes/fields/pick.php 1 location

@@ 1301-1305 (lines=5) @@
1298
        $current_language = false;
1299
1300
        // WPML support
1301
        if ( is_object( $sitepress ) && !$icl_adjust_id_url_filter_off )
1302
            $current_language = pods_sanitize( ICL_LANGUAGE_CODE );
1303
        // Polylang support
1304
        elseif ( function_exists( 'pll_current_language' ) )
1305
            $current_language = pll_current_language( 'slug' );
1306
1307
        $object_params = array_merge(
1308
            array(