Remove quick edit for custom post type

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 … Read more

How to get current post ID in quick edit callback

You can get the ID per JavaScript from the quick edit screen’s parent tr: that has an attribute id=”edit-418″, where 418 is the post ID. So extract this number, get the post data per AJAX, and insert the values you need. Not elegant. Read wp-admin/js/inline-edit-post.js to see how the core does it.

Disable “quick edit” only for non admin in functions.php

Use current_user_can to wrap the add_filter call: if ( current_user_can(‘manage_options’) ) { } else { add_filter(‘post_row_actions’,’remove_quick_edit’,10,1); } manage_options is an Admin capability. If the current user can do it, he’s an admin (on a vanilla WP installation). See: http://codex.wordpress.org/Roles_and_Capabilities and http://codex.wordpress.org/Function_Reference/current_user_can

Show Custom Fields in Quick Edit

After adding our custom column, we are ready to expand our Post Quick Edit menu using the quick_edit_custom_box action hook. Note – The quick_edit_custom_box action hook will not fire unless there are custom columns present. That is why we started by adding a custom column. add_action(‘quick_edit_custom_box’, ‘shiba_add_quick_edit’, 10, 2); function shiba_add_quick_edit($column_name, $post_type) { if ($column_name … Read more