Skip to content

Instantly share code, notes, and snippets.

@lanche86
Created August 27, 2013 07:10
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lanche86/6350522 to your computer and use it in GitHub Desktop.
Save lanche86/6350522 to your computer and use it in GitHub Desktop.
Remove quick edit for custom post type
// remove quick edit for custom post type
// not needed if Title is removed
add_filter( 'post_row_actions', 'remove_row_actions', 10, 2 );
function remove_row_actions( $unset_actions, $post ) {
global $current_screen;
if ( $current_screen->post_type != 'custom_redirect' ) return $unset_actions;
unset( $unset_actions['edit'] );
unset( $unset_actions[ 'view' ] );
unset( $unset_actions['trash'] );
unset( $unset_actions[ 'inline hide-if-no-js' ] );
return $unset_actions;
}
@pgroot91
Copy link

unset( $unset_actions[ 'inline hide-if-no-js' ] any work around for the following that doesn't seems to work anymore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment