Skip to content

Commit 4226098

Browse files
committed
If the script_loader_src filter returns nothing, bail instead of printing <script src="">.
props niallkennedy. fixes #22470. git-svn-id: https://develop.svn.wordpress.org/trunk@25465 602fd350-edb4-49c9-b593-d223f7449a82
1 parent b307e1a commit 4226098

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/wp-includes/class.wp-scripts.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ function do_item( $handle, $group = false ) {
119119

120120
$src = esc_url( apply_filters( 'script_loader_src', $src, $handle ) );
121121

122+
if ( ! $src )
123+
return true;
124+
122125
if ( $this->do_concat )
123126
$this->print_html .= "<script type='text/javascript' src='$src'></script>\n";
124127
else

0 commit comments

Comments
 (0)