1 | <?php |
---|
2 | /* |
---|
3 | * Plugin Name: Disable Drag/Drop File Uploads via Edit Post |
---|
4 | * Plugin URI: http://wordpress.org/plugins/ |
---|
5 | * Description: Disable the ability to drag and drop uploads directly into the WordPress Editor to allow older behavior of drag/drop text. |
---|
6 | * Author: Brandon Kraft |
---|
7 | * Version: 1.0 |
---|
8 | * Author URI: http://brandonkraft.com |
---|
9 | * License: GPL2+ |
---|
10 | */ |
---|
11 | |
---|
12 | function disable_dragdrop_wpeditor( $wp_editor_args ) { |
---|
13 | $wp_editor_args['drag_drop_upload'] = false; |
---|
14 | return $wp_editor_args; |
---|
15 | } |
---|
16 | |
---|
17 | /* Note this filter does not currently exist. */ |
---|
18 | |
---|
19 | add_filter( 'edit_form_editor_args', 'disable_dragdrop_wpeditor' ); |
---|