@@ 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 ); |
@@ 773-775 (lines=3) @@ | ||
770 | $html = "<a href='" . esc_url($src) . "'>$title</a>"; |
|
771 | ||
772 | $type = 'file'; |
|
773 | if ( ( $ext = preg_replace( '/^.+?\.([^.]+)$/', '$1', $src ) ) && ( $ext_type = wp_ext2type( $ext ) ) |
|
774 | && ( 'audio' == $ext_type || 'video' == $ext_type ) ) |
|
775 | $type = $ext_type; |
|
776 | ||
777 | /** |
|
778 | * Filters the URL sent to the editor for a specific media type. |