@@ 189-195 (lines=7) @@ | ||
186 | return $tag; |
|
187 | } |
|
188 | ||
189 | private function should_concat_script( $script ) { |
|
190 | // only concat local scripts |
|
191 | $is_local = $this->is_local_url( $script->src ); |
|
192 | // don't concat conditional scripts |
|
193 | $is_conditional = isset( $script->extra['conditional'] ); |
|
194 | return apply_filters( 'jetpack_perf_concat_script', $is_local && ! $is_conditional, $script->handle, $script->src ); |
|
195 | } |
|
196 | ||
197 | private function buffer_script( $script ) { |
|
198 | $group = isset( $script->extra['group'] ) ? $script->extra['group'] : 0; |
|
@@ 242-248 (lines=7) @@ | ||
239 | $this->concat_style_groups[$group][$media][] = $style; |
|
240 | } |
|
241 | ||
242 | private function should_concat_style( $style ) { |
|
243 | // only concat local styles |
|
244 | $is_local = $this->is_local_url( $style->src ); |
|
245 | // don't concat conditional styles |
|
246 | $is_conditional = isset( $style->extra['conditional'] ); |
|
247 | return apply_filters( 'jetpack_perf_concat_style', $is_local && ! $is_conditional, $style->handle, $style->src ); |
|
248 | } |
|
249 | ||
250 | private function is_local_url( $url ) { |
|
251 | $site_url = site_url(); |