Ticket #28195: 28195.2.diff
File 28195.2.diff, 1.9 KB (added by , 10 years ago) |
---|
-
wp-includes/js/mce-view.js
708 708 } 709 709 }, 710 710 fetch: function () { 711 wp.ajax.send( ' filter-content', {711 wp.ajax.send( 'parse-embed', { 712 712 data: { 713 713 post_ID: $( '#post_ID' ).val(), 714 714 content: this.shortcode.string() -
wp-admin/includes/ajax-actions.php
2506 2506 } 2507 2507 2508 2508 /** 2509 * Apply `the_content` filters to a string based on the post ID.2509 * Apply [embed] handlers to a string. 2510 2510 * 2511 2511 * @since 4.0.0 2512 2512 */ 2513 function wp_ajax_ filter_content() {2514 global $post ;2513 function wp_ajax_parse_embed() { 2514 global $post, $wp_embed; 2515 2515 2516 2516 if ( ! $post = get_post( (int) $_REQUEST['post_ID'] ) ) { 2517 2517 wp_send_json_error(); … … 2522 2522 } 2523 2523 2524 2524 setup_postdata( $post ); 2525 2526 wp_send_json_success( apply_filters( 'the_content', wp_unslash( $_POST['content'] ) ) ); 2525 wp_send_json_success( $wp_embed->run_shortcode( $_POST['content'] ) ); 2527 2526 } -
wp-admin/admin-ajax.php
60 60 'wp-remove-post-lock', 'dismiss-wp-pointer', 'upload-attachment', 'get-attachment', 61 61 'query-attachments', 'save-attachment', 'save-attachment-compat', 'send-link-to-editor', 62 62 'send-attachment-to-editor', 'save-attachment-order', 'heartbeat', 'get-revision-diffs', 63 'save-user-color-scheme', 'update-widget', 'query-themes', ' filter-content'63 'save-user-color-scheme', 'update-widget', 'query-themes', 'parse-embed' 64 64 ); 65 65 66 66 // Register core Ajax calls.