Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Looking for a way to disable the "Edit Image" option. I would still like to be able to edit the description, alt, etc. But remove the Edit image button or disable that image editor. Thanks,

share|improve this question

2 Answers 2

I figured it out. Just put this in your functions.php file

add_action('admin_head-media-upload-popup', 'remove_edit_image_button'); // for the pop up media box
add_action('admin_head', 'remove_edit_image_button'); // for the media page

function remove_edit_image_button()
{
?>
<style>
    .A1B1 p .button
    {
        display:none;
    }
</style>
<?php
}
share|improve this answer

The CSS selectors above didn't work for me; however, after inspecting the page I came up with this, which did work:

function remove_edit_image_button()
{
    ?>
    <style>
        .wp_attachment_image p .button
        {
            display:none;
        }
    </style>
<?php
}

Could be due to another plugin I'm using, or a different WP version, I don't know.

Just posting in case someone else encounters this.

share|improve this answer
    
This is partial answer. Only hide. User still can build url by hand and edit image. –  Marcin Oct 8 at 19:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.