Make WordPress Core

Ticket #13592: 13592.patch

File 13592.patch, 760 bytes (added by Quiet Nic, 13 years ago)

Add script_loader_tag filter to match style_loader_tag.

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

     
    123123                $src = esc_url(apply_filters( 'script_loader_src', $src, $handle ));
    124124
    125125                if ( $this->do_concat )
    126                         $this->print_html .= "<script type='text/javascript' src='$src'></script>\n";
     126                        $this->print_html .= apply_filters( 'script_loader_tag', "<script type='text/javascript' src='$src'></script>\n", $handle );
    127127                else
    128                         echo "<script type='text/javascript' src='$src'></script>\n";
     128                        echo apply_filters( 'script_loader_tag', "<script type='text/javascript' src='$src'></script>\n", $handle );
    129129
    130130                return true;
    131131        }