X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/9e77185fafaf4e60e2b73821e0e4b9b1a11fb85f..a7cd4c052013b423c6301153f68c7fdbaa2a447b:/wp-includes/class.wp-scripts.php diff --git a/wp-includes/class.wp-scripts.php b/wp-includes/class.wp-scripts.php index 89a9ec91..fbb8b220 100644 --- a/wp-includes/class.wp-scripts.php +++ b/wp-includes/class.wp-scripts.php @@ -47,13 +47,15 @@ class WP_Scripts extends WP_Dependencies { } /** - * Prints scripts + * Prints scripts. * * Prints the scripts passed to it or the print queue. Also prints all necessary dependencies. * - * @param mixed $handles (optional) Scripts to be printed. (void) prints queue, (string) prints that script, (array of strings) prints those scripts. - * @param int $group (optional) If scripts were queued in groups prints this group number. - * @return array Scripts that have been printed + * @param mixed $handles Optional. Scripts to be printed. (void) prints queue, (string) prints + * that script, (array of strings) prints those scripts. Default false. + * @param int $group Optional. If scripts were queued in groups prints this group number. + * Default false. + * @return array Scripts that have been printed. */ public function print_scripts( $handles = false, $group = false ) { return $this->do_items( $handles, $group ); @@ -138,10 +140,24 @@ class WP_Scripts extends WP_Dependencies { if ( ! $src ) return true; - if ( $this->do_concat ) - $this->print_html .= "\n"; - else - echo "\n"; + $tag = "\n"; + + /** + * Filter the HTML script tag of an enqueued script. + * + * @since 4.1.0 + * + * @param string $tag The `