function egmInsertFLVButton($form_fields, $post) { $file = wp_get_attachment_url($post->ID); if ($post->post_mime_type == 'application/octet-stream') { $form_fields["url"]["html"] .= ""; $form_fields["url"]["html"] .= "\n"; } return $form_fields; } add_filter("attachment_fields_to_edit", "egmInsertFLVButton", 20, 2); function egmSendToEditor( $html, $send_id, $attachment ) { if (substr($attachment[url], 0, 5) == "[flv:") return substr($attachment[url], 0, -1) . " 320 240]"; else return $html; } add_filter( 'media_send_to_editor', 'egmSendToEditor', 20, 3 );