Viewing 1 replies (of 1 total)
  • azizul karim aec

    Here’s some code that you can add in theme’s functions.php file or any custom plugin you might be using, which will disable the user’s ability to edit images(except for administrators).

    add_filter('wp_image_editors','remove_edit_image_functionality');
    function remove_edit_image_functionality($methods){
        if(current_user_can('activate_plugins')){
            return $methods;
        }
        else{
            return array();
        }
    }
Viewing 1 replies (of 1 total)
  • The topic ‘disble edit media for non-admin’ is closed to new replies.