Disable mouse image resizing in editor

I want to disable the mouse image resizing function in wordpress standard editor. So that its not possible to resize the default image size when you select an image and pull on it.

Any idea how i can do that?

Thx for your help and best regards.

1 Answer
1

I use a lot of CSS to manipulate things in the WP UI. I have this in a plugin – should work as expected. If you are already hooked into the admin CSS then bypass the filter.

PHP

add_filter ('admin_enqueue_scripts', array(&$this, 'load_custom_wp_admin_style' ));

function load_custom_wp_admin_style() {

                echo 
                    '<style type="text/css" rel="stylesheet-default-admin">

                    @import url('.WPMSGC_URL.'/assets/css/default-admin.css);' 

                        . $this->options['default_admin_css'] . //*** Load Default Styles

                    '</style>';}

CSS

a.edit-attachment {
display: none !important;
}
input#imgedit-open-btn-47 {
display: none;
}

This will hide the “Edit Image” link and the “Edit Image” button in Media.

Hope this helps. Works perfectly on my MS install.

Leave a Comment