Changeset 31744
- Timestamp:
- 03/12/2015 03:16:51 AM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/inline-edit-post.js
r31741 r31744 273 273 $(inlineEditPost.what+id).siblings('tr.hidden').addBack().remove(); 274 274 $('#edit-'+id).before(r).remove(); 275 w indow.WPEmoji.parse( $( inlineEditPost.what + id ).get( 0 ) );275 wp.emoji.parse( $( inlineEditPost.what + id ).get( 0 ) ); 276 276 $(inlineEditPost.what+id).hide().fadeIn(); 277 277 } else { -
trunk/src/wp-admin/js/inline-edit-tax.js
r31741 r31744 118 118 $( '#parent' ).find( 'option[value=' + option_value + ']' ).text( row.find( '.row-title' ).text() ); 119 119 120 w indow.WPEmoji.parse( row.get( 0 ) );120 wp.emoji.parse( row.get( 0 ) ); 121 121 122 122 row.hide().fadeIn(); -
trunk/src/wp-admin/js/post.js
r31741 r31744 742 742 } 743 743 744 w indow.WPEmoji.parse( box.get( 0 ) );744 wp.emoji.parse( box.get( 0 ) ); 745 745 746 746 b.html(revert_b); -
trunk/src/wp-admin/js/tags.js
r31741 r31744 50 50 $( '.tags' ).prepend( res.responses[0].supplemental.parents ); // As the parent is not visible, Insert the version with Parent - Child - ThisTerm 51 51 52 w indow.WPEmoji.parse( $( '.tags' ).get( 0 ) );52 wp.emoji.parse( $( '.tags' ).get( 0 ) ); 53 53 54 54 $('.tags .no-items').remove(); -
trunk/src/wp-includes/js/tinymce/plugins/wpemoji/plugin.js
r31733 r31744 1 ( function( tinymce, WPEmoji) {1 ( function( tinymce, wp ) { 2 2 tinymce.PluginManager.add( 'wpemoji', function( editor, url ) { 3 3 var typing; 4 4 5 if ( ! WPEmoji.parseEmoji ) {5 if ( ! wp.emoji.parseEmoji ) { 6 6 return; 7 7 } … … 33 33 bookmark = selection.getBookmark(); 34 34 35 WPEmoji.parse( node );35 wp.emoji.parse( node ); 36 36 37 37 imgs = editor.dom.select( 'img.emoji', node ); … … 62 62 } ); 63 63 } ); 64 } )( window.tinymce, window. WPEmoji);64 } )( window.tinymce, window.wp ); -
trunk/src/wp-includes/js/twemoji.js
- Property svn:executable deleted
-
trunk/src/wp-includes/js/wp-emoji.js
- Property svn:executable deleted
r31742 r31744 1 /* global EmojiSettings, twemoji */2 var WPEmoji;1 /* global _wpemojiSettings, twemoji */ 2 window.wp = window.wp || {}; 3 3 4 4 (function() { 5 WPEmoji = { 5 var emoji; 6 7 wp.emoji = emoji = { 6 8 /** 7 9 * The CDN URL for where emoji files are hosted. … … 11 13 * @var string 12 14 */ 13 base _url: '//s0.wp.com/wp-content/mu-plugins/emoji/twemoji/72x72',15 baseUrl: '//s0.wp.com/wp-content/mu-plugins/emoji/twemoji/72x72', 14 16 15 17 /** … … 55 57 */ 56 58 init: function() { 57 if ( typeof EmojiSettings !== 'undefined' ) {58 this.base_url = EmojiSettings.base_url || this.base_url;59 this.ext = EmojiSettings.ext || this.ext;60 } 61 62 WPEmoji.parseAllEmoji = ! WPEmoji.browserSupportsEmoji();63 WPEmoji.parseFlags = ! WPEmoji.browserSupportsFlagEmoji();64 WPEmoji.parseEmoji = WPEmoji.parseAllEmoji || WPEmoji.parseFlags;65 66 if ( ! WPEmoji.parseEmoji ) {59 if ( typeof _wpemojiSettings !== 'undefined' ) { 60 emoji.baseUrl = _wpemojiSettings.baseUrl || emoji.baseUrl; 61 emoji.ext = _wpemojiSettings.ext || emoji.ext; 62 } 63 64 emoji.parseAllEmoji = ! emoji.browserSupportsEmoji(); 65 emoji.parseFlags = ! emoji.browserSupportsFlagEmoji(); 66 emoji.parseEmoji = emoji.parseAllEmoji || emoji.parseFlags; 67 68 if ( ! emoji.parseEmoji ) { 67 69 return; 68 70 } … … 75 77 */ 76 78 load: function() { 77 WPEmoji.parse( document.body );79 emoji.parse( document.body ); 78 80 }, 79 81 … … 161 163 */ 162 164 parse: function( element ) { 163 if ( ! WPEmoji.parseEmoji ) {165 if ( ! emoji.parseEmoji ) { 164 166 return; 165 167 } 166 168 167 169 return twemoji.parse( element, { 168 base: this.base_url,169 ext: this.ext,170 base: emoji.baseUrl, 171 ext: emoji.ext, 170 172 callback: function( icon, options ) { 171 173 // Ignore some standard characters that TinyMCE recommends in its character map. … … 182 184 } 183 185 184 if ( WPEmoji.parseFlags && ! WPEmoji.parseAllEmoji && ! icon.match( /^1f1(e[6-9a-f]|f[1-9a-f])-1f1(e[6-9a-f]|f[1-9a-f])$/ ) ) {186 if ( emoji.parseFlags && ! emoji.parseAllEmoji && ! icon.match( /^1f1(e[6-9a-f]|f[1-9a-f])-1f1(e[6-9a-f]|f[1-9a-f])$/ ) ) { 185 187 return false; 186 188 } … … 193 195 194 196 if ( window.addEventListener ) { 195 window.addEventListener( 'load', WPEmoji.load, false );197 window.addEventListener( 'load', emoji.load, false ); 196 198 } else if ( window.attachEvent ) { 197 window.attachEvent( 'onload', WPEmoji.load );199 window.attachEvent( 'onload', emoji.load ); 198 200 } 199 201 200 WPEmoji.init();202 emoji.init(); 201 203 })(); -
trunk/src/wp-includes/script-loader.php
r31741 r31744 426 426 427 427 $scripts->add( 'twemoji', "/wp-includes/js/twemoji$suffix.js", array(), false, 1 ); 428 $scripts->add( 'emoji', "/wp-includes/js/ emoji$suffix.js", array( 'twemoji' ), false, 1 );429 did_action( 'init' ) && $scripts->localize( ' emoji', 'EmojiSettings', array(428 $scripts->add( 'emoji', "/wp-includes/js/wp-emoji$suffix.js", array( 'twemoji' ), false, 1 ); 429 did_action( 'init' ) && $scripts->localize( 'wp-emoji', '_wpemojiSettings', array( 430 430 /** 431 431 * Filter the URL where emoji images are hosted. … … 435 435 * @param string The emoji base URL. 436 436 */ 437 'base _url' => apply_filters( 'emoji_url', '//s0.wp.com/wp-content/mu-plugins/emoji/twemoji/72x72/' ),437 'baseUrl' => apply_filters( 'emoji_url', '//s0.wp.com/wp-content/mu-plugins/emoji/twemoji/72x72/' ), 438 438 /** 439 439 * Filter the extension of the emoji files.
Note: See TracChangeset
for help on using the changeset viewer.