It is very easy to remove the ‘quick edit’ option from the post in wordpress, just add these code to your custom plugin script or your theme’s function script:
function remove_quick_edit( $actions ) { unset($actions['inline hide-if-no-js']); } add_filter('post_row_actions','remove_quick_edit',10,1);
If you want to exclude Administrator from these script :
function remove_quick_edit( $actions ) { if ( ! current_user_can('administrator') ) { unset($actions['inline hide-if-no-js']); } return $actions; } add_filter('post_row_actions','remove_quick_edit',10,1);
Comment if this script is not working . Happy Coding
No Comments
Leave a comment Cancel