Forum Replies Created
-
AuthorPosts
-
digitaliway
ParticipantI was able to get this working with the below code. The code you posted does not contain “page_row_actions” and the code on https://www.role-editor.com/block-permalink-edit-button/ does not seem to work so I changed it to the filter “get_sample_permalink_html” below which seems more efficient unless you see a better solution?
//remove quick edit functions for page and post function remove_quick_edit( $actions ) { unset($actions['inline hide-if-no-js']); return $actions; } if ( current_user_can('page-editor') ) { add_filter('page_row_actions','remove_quick_edit',10,1); add_filter('post_row_actions','remove_quick_edit',10,1); } //hide permalink edit buton on page for role function hide_permalink() { return ''; } if ( current_user_can('page-editor') ) { add_filter( 'get_sample_permalink_html', 'hide_permalink' ); }digitaliway
ParticipantThis did not work. can you please provide specific code or update plugin to have capability?
I have a role called: page-editor
I added this exact code to the functions file and QUICKEDIT and PERMALINK EDIT still remain.
if (current_user_can(‘page-editor’)) {
add_filter(‘post_row_actions’,’remove_quick_edit’,10,1);
}
function remove_quick_edit( $actions ) {unset($actions[‘inline hide-if-no-js’]);
return $actions;
} -
AuthorPosts