Code Duplication    Length = 10-10 lines in 2 locations

classes/autoptimizeCriticalCSSCore.php 2 locations

@@ 134-143 (lines=10) @@
131
                                }
132
                            }
133
                        } elseif ( 0 === strpos( $type, 'template_' ) && ! $is_front_page ) {
134
                            if ( is_page_template( substr( $type, 9 ) ) ) {
135
                                if ( 'none' != $_ccss_contents ) {
136
                                    if ( $ao_ccss_debug ) {
137
                                        $_ccss_contents = '/* TYPES: ' . $type . ' hash: ' . $rule['hash'] . ' file: ' . $rule['file'] . ' */ ' . $_ccss_contents;
138
                                    }
139
                                    return apply_filters( 'autoptimize_filter_ccss_core_ccss', $_ccss_contents . $ao_ccss_additional );
140
                                } else {
141
                                    $no_ccss = 'none';
142
                                }
143
                            }
144
                        } elseif ( ! $is_front_page ) {
145
                            // all "normal" conditional tags, core + woo + buddypress + edd + bbpress
146
                            // but we have to remove the prefix for the non-core ones for them to function.
@@ 148-157 (lines=10) @@
145
                            // all "normal" conditional tags, core + woo + buddypress + edd + bbpress
146
                            // but we have to remove the prefix for the non-core ones for them to function.
147
                            $type = str_replace( array( 'woo_', 'bp_', 'bbp_', 'edd_' ), '', $type );
148
                            if ( function_exists( $type ) && call_user_func( $type ) ) {
149
                                if ( 'none' != $_ccss_contents ) {
150
                                    if ( $ao_ccss_debug ) {
151
                                        $_ccss_contents = '/* TYPES: ' . $type . ' hash: ' . $rule['hash'] . ' file: ' . $rule['file'] . ' */ ' . $_ccss_contents;
152
                                    }
153
                                    return apply_filters( 'autoptimize_filter_ccss_core_ccss', $_ccss_contents . $ao_ccss_additional );
154
                                } else {
155
                                    $no_ccss = 'none';
156
                                }
157
                            }
158
                        }
159
                    }
160
                }