Code Duplication    Length = 4-5 lines in 2 locations

classes/autoptimizeHTML.php 1 location

@@ 43-46 (lines=4) @@
40
41
        // Filterable strings to be excluded from HTML minification.
42
        $exclude = apply_filters( 'autoptimize_filter_html_exclude', '' );
43
        if ( '' !== $exclude ) {
44
            $exclude_arr   = array_filter( array_map( 'trim', explode( ',', $exclude ) ) );
45
            $this->exclude = array_merge( $exclude_arr, $this->exclude );
46
        }
47
48
        // Nothing else for HTML!
49
        return true;

classes/autoptimizeStyles.php 1 location

@@ 99-103 (lines=5) @@
96
97
        // List of CSS strings which are excluded from autoptimization.
98
        $excludeCSS = apply_filters( 'autoptimize_filter_css_exclude', $options['css_exclude'], $this->content );
99
        if ( '' !== $excludeCSS ) {
100
            $this->dontmove = array_filter( array_map( 'trim', explode( ',', $excludeCSS ) ) );
101
        } else {
102
            $this->dontmove = array();
103
        }
104
105
        // forcefully exclude CSS with data-noptimize attrib.
106
        $this->dontmove[] = 'data-noptimize';