Code Duplication    Length = 3-3 lines in 2 locations

classes/autoptimizeExtra.php 2 locations

@@ 338-340 (lines=3) @@
335
        $preconns = array();
336
337
        // Get settings and store in array.
338
        if ( array_key_exists( 'autoptimize_extra_text_field_2', $options ) ) {
339
            $preconns = array_filter( array_map( 'trim', explode( ',', $options['autoptimize_extra_text_field_2'] ) ) );
340
        }
341
        $preconns = apply_filters( 'autoptimize_extra_filter_tobepreconn', $preconns );
342
343
        // Walk array, extract domain and add to new array with crossorigin attribute.
@@ 393-395 (lines=3) @@
390
        // make array from comma separated list.
391
        $options  = $this->options;
392
        $preloads = array();
393
        if ( array_key_exists( 'autoptimize_extra_text_field_7', $options ) ) {
394
            $preloads = array_filter( array_map( 'trim', explode( ',', $options['autoptimize_extra_text_field_7'] ) ) );
395
        }
396
        $preloads = apply_filters( 'autoptimize_filter_extra_tobepreloaded', $preloads );
397
398
        // immediately return if nothing to be preloaded.