Code Duplication    Length = 5-5 lines in 2 locations

classes/autoptimizeScripts.php 1 location

@@ 66-70 (lines=5) @@
63
        }
64
65
        // only header?
66
        if ( apply_filters( 'autoptimize_filter_js_justhead', $options['justhead'] ) ) {
67
            $content             = explode( '</head>', $this->content, 2 );
68
            $this->content       = $content[0] . '</head>';
69
            $this->restofcontent = $content[1];
70
        }
71
72
        // Determine whether we're doing JS-files aggregation or not.
73
        if ( ! $options['aggregate'] ) {

classes/autoptimizeStyles.php 1 location

@@ 77-81 (lines=5) @@
74
        $this->inject_min_late = apply_filters( 'autoptimize_filter_css_inject_min_late', true );
75
76
        // Remove everything that's not the header.
77
        if ( apply_filters( 'autoptimize_filter_css_justhead', $options['justhead'] ) ) {
78
            $content             = explode( '</head>', $this->content, 2 );
79
            $this->content       = $content[0] . '</head>';
80
            $this->restofcontent = $content[1];
81
        }
82
83
        // Determine whether we're doing CSS-files aggregation or not.
84
        if ( isset( $options['aggregate'] ) && ! $options['aggregate'] ) {