Ticket #31242: 31242.14.patch
File 31242.14.patch, 2.2 KB (added by , 10 years ago) |
---|
-
src/wp-includes/js/twemoji.js
1 1 /*jslint indent: 2, browser: true, bitwise: true, plusplus: true */ 2 var twemoji; 3 twemoji = (function ( 2 var twemoji = (function ( 4 3 /*! Copyright Twitter Inc. and other contributors. Licensed under MIT *//* 5 4 https://github.com/twitter/twemoji/blob/gh-pages/LICENSE 6 5 */ … … 327 326 var 328 327 allText = grabAllTextNodes(node, []), 329 328 length = allText.length, 329 modified = false, 330 330 fragment, 331 331 subnode, 332 332 text, … … 367 367 img.setAttribute('draggable', 'false'); 368 368 img.alt = alt; 369 369 img.src = src; 370 modified = true; 371 fragment.appendChild(img); 370 372 } 371 373 } 372 fragment.appendChild(img || createText(alt)); 374 if (!img) fragment.appendChild(createText(alt)); 375 img = null; 373 376 } 374 377 // is there actually anything to replace in here ? 375 if (img) { 376 img = null; 378 if (modified) { 377 379 // any text left to be added ? 378 380 if (i < text.length) { 379 381 fragment.appendChild( … … 516 518 return r.join(sep || '-'); 517 519 } 518 520 519 }()); 521 }()); 522 No newline at end of file -
src/wp-includes/script-loader.php
424 424 $scripts->add( 'media-audiovideo', "/wp-includes/js/media/audio-video$suffix.js", array( 'media-editor' ), false, 1 ); 425 425 $scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'media-models', 'media-audiovideo', 'wp-playlist' ), false, 1 ); 426 426 427 $scripts->add( 'twemoji', "/wp-includes/js/twemoji$suffix.js", array(), false, 1 );427 $scripts->add( 'twemoji', "/wp-includes/js/twemoji$suffix.js", array(), '1.3.0', 1 ); 428 428 $scripts->add( 'emoji', "/wp-includes/js/wp-emoji$suffix.js", array( 'twemoji' ), false, 1 ); 429 429 did_action( 'init' ) && $scripts->localize( 'emoji', '_wpemojiSettings', array( 430 430 /**