Code Duplication    Length = 4-5 lines in 2 locations

classes/autoptimizeHTML.php 1 location

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

classes/autoptimizeStyles.php 1 location

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