| @@ 774-776 (lines=3) @@ | ||
| 771 | $html = "<a href='" . esc_url($src) . "'>$title</a>"; | |
| 772 | ||
| 773 | $type = 'file'; | |
| 774 | if ( ( $ext = preg_replace( '/^.+?\.([^.]+)$/', '$1', $src ) ) && ( $ext_type = wp_ext2type( $ext ) ) | |
| 775 | && ( 'audio' == $ext_type || 'video' == $ext_type ) ) | |
| 776 | $type = $ext_type; | |
| 777 | ||
| 778 | /** | |
| 779 | * Filters the URL sent to the editor for a specific media type. | |
| @@ 2709-2711 (lines=3) @@ | ||
| 2706 | ||
| 2707 | // Figure out what filter to run: | |
| 2708 | $type = 'file'; | |
| 2709 | if ( ( $ext = preg_replace( '/^.+?\.([^.]+)$/', '$1', $src ) ) && ( $ext_type = wp_ext2type( $ext ) ) | |
| 2710 | && ( 'audio' == $ext_type || 'video' == $ext_type ) ) | |
| 2711 | $type = $ext_type; | |
| 2712 | ||
| 2713 | /** This filter is documented in wp-admin/includes/media.php */ | |
| 2714 | $html = apply_filters( $type . '_send_to_editor_url', $html, $src, $link_text ); | |