Remove quick edit for custom post type

Is it possible to remove the quick edit function for a custom post type?

I have 14 custom taxonomy with hundreds of terms in each and it takes too much time and resource to load all of them into the source-code of the page.

I tried to find a solution using google but most of them just hides the quick edit button, but the code is loaded in the footer by wordpress, so it doesn’t really make any difference.

3 Answers
3

Check out the builk actions page in the codex. I believe the proper action to unset is inline. This will remove the “Edit” bulk action, which is actually quick edit.

<?php
    function remove_bulk_actions( $actions ){
        unset( $actions['inline'] );
        return $actions;
    }
    add_filter('bulk_actions-custom_post_type_slug','remove_bulk_actions');
?>

As for the Quick edit in each row, look into manage_{$post_type}_columns, as you may be able to replace the Title column with your own, and render it how you wish. There is currently no filters to remove Quick edit in the WP Posts List Table, so if the replacing of the column does not work, then you will need to create your own WP list table extension (Great tutorial).

Leave a Comment