Code Duplication    Length = 6-6 lines in 2 locations

classes/autoptimizeHTML.php 2 locations

@@ 69-74 (lines=6) @@
66
        }
67
68
        // Wrap the to-be-excluded strings in noptimize tags.
69
        foreach ( $this->exclude as $str ) {
70
            if ( false !== strpos( $this->content, $str ) ) {
71
                $replacement   = '<!--noptimize-->' . $str . '<!--/noptimize-->';
72
                $this->content = str_replace( $str, $replacement, $this->content );
73
            }
74
        }
75
76
        // Noptimize.
77
        $this->content = $this->hide_noptimize( $this->content );
@@ 95-100 (lines=6) @@
92
        $this->content = $this->restore_noptimize( $this->content );
93
94
        // Remove the noptimize-wrapper from around the excluded strings.
95
        foreach ( $this->exclude as $str ) {
96
            $replacement = '<!--noptimize-->' . $str . '<!--/noptimize-->';
97
            if ( false !== strpos( $this->content, $replacement ) ) {
98
                $this->content = str_replace( $replacement, $str, $this->content );
99
            }
100
        }
101
102
        // Revslider data attribs somehow suffer from HTML optimization, this fixes that!
103
        if ( class_exists( 'RevSlider' ) && apply_filters( 'autoptimize_filter_html_dataattrib_cleanup', false ) ) {