Changeset 28580
- Timestamp:
- 05/26/2014 11:42:08 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/admin-ajax.php
r28478 r28580 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 -
trunk/src/wp-admin/includes/ajax-actions.php
r28539 r28580 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'] ) ) { … … 2524 2524 setup_postdata( $post ); 2525 2525 2526 wp_send_json_success( apply_filters( 'the_content', wp_unslash( $_POST['content'] ) ) ); 2527 } 2526 $parsed = $wp_embed->run_shortcode( $_POST['content'] ); 2527 if ( preg_match( '/' . get_shortcode_regex() . '/s', $parsed ) ) { 2528 $parsed = do_shortcode( $parsed ); 2529 } 2530 wp_send_json_success( $parsed ); 2531 } -
trunk/src/wp-includes/js/mce-view.js
r28364 r28580 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(),
Note: See TracChangeset
for help on using the changeset viewer.