Changeset 28754 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 06/15/2014 10:52:45 PM (11 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
r28587 r28754 2531 2531 } 2532 2532 2533 if ( ! current_user_can( 'read_post', $post->ID ) ) {2533 if ( empty( $_POST['shortcode'] ) || ! current_user_can( 'read_post', $post->ID ) ) { 2534 2534 wp_send_json_error(); 2535 2535 } … … 2537 2537 setup_postdata( $post ); 2538 2538 2539 $parsed = $wp_embed->run_shortcode( $_POST['content'] ); 2539 // If the URL cannot be embedded, return an eror message with wp_send_json_error() 2540 add_filter( 'embed_maybe_make_link', '_wpview_embed_error', 20, 2 ); 2541 2542 $parsed = $wp_embed->run_shortcode( $_POST['shortcode'] ); 2540 2543 $parsed = do_shortcode( $parsed ); 2541 2544
Note: See TracChangeset
for help on using the changeset viewer.