Changeset 32055 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 04/06/2015 06:24:53 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/ajax-actions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r32007 r32055 2485 2485 wp_send_json_error(); 2486 2486 2487 if ( ! $ title = trim( wp_unslash( $_POST['title'] ) ) )2488 $ title= wp_basename( $src );2487 if ( ! $link_text = trim( wp_unslash( $_POST['link_text'] ) ) ) 2488 $link_text = wp_basename( $src ); 2489 2489 2490 2490 $post = get_post( isset( $_POST['post_id'] ) ? $_POST['post_id'] : 0 ); … … 2499 2499 // TinyMCE view for [embed] will parse this 2500 2500 $html = '[embed]' . $src . '[/embed]'; 2501 } elseif ( $ title) {2502 $html = '<a href="' . esc_url( $src ) . '">' . $ title. '</a>';2501 } elseif ( $link_text ) { 2502 $html = '<a href="' . esc_url( $src ) . '">' . $link_text . '</a>'; 2503 2503 } else { 2504 2504 $html = ''; … … 2512 2512 2513 2513 /** This filter is documented in wp-admin/includes/media.php */ 2514 $html = apply_filters( $type . '_send_to_editor_url', $html, $src, $ title);2514 $html = apply_filters( $type . '_send_to_editor_url', $html, $src, $link_text ); 2515 2515 2516 2516 wp_send_json_success( $html );
Note: See TracChangeset
for help on using the changeset viewer.