Ticket #38920: 38920.patch
| File 38920.patch, 2.3 KB (added by , 10 years ago) |
|---|
-
src/wp-includes/class-wp-editor.php
560 560 'plugins' => implode( ',', $plugins ), 561 561 'wp_lang_attr' => get_bloginfo( 'language' ), 562 562 'wp_shortcut_labels' => wp_json_encode( $shortcut_labels ), 563 'rest_url' => rest_url( '/wp/v2/posts' ), 564 'rest_nonce' => wp_create_nonce( 'wp_rest' ) 563 565 ); 564 566 565 567 if ( ! empty( $mce_external_plugins ) ) { … … 1111 1113 } 1112 1114 1113 1115 $mce_translation = self::get_translation(); 1114 1116 1115 1117 foreach ( $mce_translation as $name => $value ) { 1116 1118 if ( is_array( $value ) ) { 1117 1119 $mce_translation[$name] = $value[0]; -
src/wp-includes/js/tinymce/plugins/wplink/plugin.js
405 405 return response(); 406 406 } 407 407 408 $. post( window.ajaxurl, {408 $.get( editor.settings.rest_url, { 409 409 action: 'wp-link-ajax', 410 410 page: 1, 411 411 search: request.term, 412 _ ajax_linking_nonce: $( '#_ajax_linking_nonce' ).val()412 _wp_nonce: editor.settings.rest_nonce 413 413 }, function( data ) { 414 414 cache = data; 415 415 response( data ); … … 426 426 event.preventDefault(); 427 427 }, 428 428 select: function( event, ui ) { 429 $input.val( ui.item. permalink );429 $input.val( ui.item.link ); 430 430 $( element.firstChild.nextSibling ).val( ui.item.title ); 431 431 432 432 if ( 9 === event.keyCode && typeof window.wpLinkL10n !== 'undefined' ) { … … 461 461 } 462 462 } 463 463 } ).autocomplete( 'instance' )._renderItem = function( ul, item ) { 464 return $( '<li role="option" id="mce-wp-autocomplete-' + item. ID+ '">' )465 .append( '<span>' + item.title + '</span> <span class="wp-editor-float-right">' + item.info+ '</span>' )464 return $( '<li role="option" id="mce-wp-autocomplete-' + item.id + '">' ) 465 .append( '<span>' + item.title.rendered + '</span> <span class="wp-editor-float-right">' + item.date + '</span>' ) 466 466 .appendTo( ul ); 467 467 }; 468 468
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)