Changeset 28580 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 05/26/2014 11:42:08 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/ajax-actions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.