Check if running from /src or SCRIPT_DEBUG is defined in print_emoji_detection_script().

Fixes #32118 for 4.2.
Built from https://develop.svn.wordpress.org/branches/4.2@33315


git-svn-id: http://core.svn.wordpress.org/branches/4.2@33287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2015-07-17 21:40:27 +00:00
parent 22e22a3db7
commit 9a74f7c01a

View File

@ -4140,8 +4140,9 @@ function print_emoji_detection_script() {
);
$version = 'ver=' . $wp_version;
$develop_src = false !== strpos( $wp_version, '-src' );
if ( SCRIPT_DEBUG ) {
if ( $develop_src || ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ) {
$settings['source'] = array(
/** This filter is documented in wp-includes/class.wp-scripts.php */
'wpemoji' => apply_filters( 'script_loader_src', includes_url( "js/wp-emoji.js?$version" ), 'wpemoji' ),