Add the ability to print data *after* a script, whether it is concatenated or not:

* Add a third argument to `WP_Scripts->print_extra_script()`, `$key`, which will be passed to `->get_data()` (no longer passes hardcoded `'data'`)
* When `$key` is set to `'data-after'`, the inline script will be printed after the `<script>` tag. If the scripts are being concatenated, all scripts' `'data-after'` data will be printed after the concatenated `<script>` has been rendered.

Props hakre, wonderboymusic.
Fixes #25277.

Built from https://develop.svn.wordpress.org/trunk@31032


git-svn-id: http://core.svn.wordpress.org/trunk@31013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor
2015-01-03 05:08:24 +00:00
parent f7aef5b69a
commit 650a6d1062
3 changed files with 25 additions and 5 deletions

View File

@@ -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.