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

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