2

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,

0

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.

  • This is partial answer. Only hide. User still can build url by hand and edit image. – Marcin Oct 8 '14 at 19:55
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
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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