Code Duplication    Length = 5-5 lines in 3 locations

classes/fields/pick.php 1 location

@@ 1290-1294 (lines=5) @@
1287
        $current_language = false;
1288
1289
        // WPML support
1290
        if ( is_object( $sitepress ) && !$icl_adjust_id_url_filter_off )
1291
            $current_language = pods_sanitize( ICL_LANGUAGE_CODE );
1292
        // Polylang support
1293
        elseif ( function_exists( 'pll_current_language' ) )
1294
            $current_language = pll_current_language( 'slug' );
1295
1296
        $object_params = array_merge(
1297
            array(

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