diff --git a/wp-includes/class.wp-scripts.php b/wp-includes/class.wp-scripts.php index e7df14e6b3..05cde56170 100644 --- a/wp-includes/class.wp-scripts.php +++ b/wp-includes/class.wp-scripts.php @@ -27,6 +27,7 @@ class WP_Scripts extends WP_Dependencies { public $print_html = ''; public $print_code = ''; public $ext_handles = ''; + public $print_after_html = ''; public $ext_version = ''; public $default_dirs; @@ -67,12 +68,14 @@ class WP_Scripts extends WP_Dependencies { return $this->print_extra_script( $handle, $echo ); } - public function print_extra_script( $handle, $echo = true ) { - if ( !$output = $this->get_data( $handle, 'data' ) ) + public function print_extra_script( $handle, $echo = true, $key = 'data' ) { + if ( ! $output = $this->get_data( $handle, $key ) ) { return; + } - if ( !$echo ) + if ( ! $echo ) { return $output; + } echo "\n"; } - if ( !empty($wp_scripts->print_html) ) + if ( ! empty( $wp_scripts->print_html ) ) { echo $wp_scripts->print_html; + } + + if ( ! empty( $wp_scripts->print_after_html ) ) { + if ( $wp_scripts->do_concat ) { + echo "\n"; + } else { + echo $wp_scripts->print_after_html; + } + } } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 24b6b29429..a5022fd87a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31031'; +$wp_version = '4.2-alpha-31032'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.