Code Duplication    Length = 5-5 lines in 3 locations

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(

classes/PodsAPI.php 2 locations

@@ 5277-5281 (lines=5) @@
5274
        $load_fields = true;
5275
5276
        // WPML support
5277
        if ( is_object( $sitepress ) && !$icl_adjust_id_url_filter_off )
5278
            $current_language = pods_sanitize( ICL_LANGUAGE_CODE );
5279
        // Polylang support
5280
        elseif ( function_exists( 'pll_current_language' ) )
5281
            $current_language = pll_current_language( 'slug' );
5282
5283
        if ( !is_array( $params ) && !is_object( $params ) )
5284
            $params = array( 'name' => $params, 'table_info' => false, 'fields' => true );
@@ 5548-5552 (lines=5) @@
5545
        $current_language = false;
5546
5547
        // WPML support
5548
        if ( is_object( $sitepress ) && !$icl_adjust_id_url_filter_off )
5549
            $current_language = pods_sanitize( ICL_LANGUAGE_CODE );
5550
        // Polylang support
5551
        elseif ( function_exists( 'pll_current_language' ) )
5552
            $current_language = pll_current_language( 'slug' );
5553
5554
        $params = (object) pods_sanitize( $params );
5555