# Remove Quick Edit for Non-Administrators

> Hides the Quick Edit link and the Edit bulk action for everyone except administrators, so status, dates and slugs are only changed in the full editor.

- Type: PHP
- Runs: Admin only
- Category: [Admin](https://wpide.com/library/category/admin/)
- Tags: admin, list-table, permissions
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/remove-quick-edit-non-admins/

## Code

```php
$wpide_remove_quick_edit = function ( $actions ) {
    if ( ! current_user_can( 'manage_options' ) ) {
        unset( $actions['inline hide-if-no-js'] );
    }

    return $actions;
};

add_filter( 'post_row_actions', $wpide_remove_quick_edit, 20 );
add_filter( 'page_row_actions', $wpide_remove_quick_edit, 20 );

add_action( 'admin_init', function () {
    if ( current_user_can( 'manage_options' ) ) {
        return;
    }

    foreach ( get_post_types( array( 'show_ui' => true ) ) as $post_type ) {
        add_filter( "bulk_actions-edit-{$post_type}", function ( $actions ) {
            unset( $actions['edit'] );

            return $actions;
        } );
    }
} );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Remove Quick Edit for Non-Administrators" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
