From c21e4f95ce85516749666c784d9885dc46df3f04 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 3 Jan 2015 05:07:15 +0000 Subject: [PATCH] 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 `\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; + } + } } /**