Skip to content

Commit

Permalink
Add the filter on its own line + reference the original documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
remyperona committed Sep 7, 2016
1 parent 22799dd commit 342909a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion inc/front/minify.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ function __rocket_insert_minify_js_in_footer() {

$i = 0;
foreach( $files as $file ) {
list( $file_host, $file_path ) = get_rocket_parse_url( apply_filters( 'script_loader_src', $file ) );
/** This filter is documented in wp-includes/class.wp-scripts.php */
$file = apply_filters( 'script_loader_src', $file );
list( $file_host, $file_path ) = get_rocket_parse_url( $file );

// Check if its an external file
if( $home_host != $file_host && ! in_array( $file_host, $cnames_host ) && ! in_array( $file_path, $rocket_enqueue_js_in_footer ) ) {
Expand Down

0 comments on commit 342909a

Please sign in to comment.