Skip to content

Instantly share code, notes, and snippets.

@yoren
Forked from WerdsWords/post_row_actions.php
Last active January 1, 2016 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoren/8119873 to your computer and use it in GitHub Desktop.
Save yoren/8119873 to your computer and use it in GitHub Desktop.
Remove quickedit.
<?php
/**
* Disable Quick Edit row action for posts
*
* @see WP_Posts_List_Table::single_row()
*
* @param array $actions An array of row actions, keys corresponding to the span class attribute of each element.
* @param object $post The post object.
*
* @return array The row actions array.
*/
function royal_no_quickedit( $actions, $post ) {
if ( isset( $actions['inline hide-if-no-js'] ) )
unset( $actions['inline hide-if-no-js'] );
return $actions;
}
add_filter( 'post_row_actions', 'royal_no_quickedit', 10, 2 );
add_filter( 'page_row_actions', 'royal_no_quickedit', 10, 2 );
function royal_custom_bulk_actions($actions){
unset( $actions['edit'] );
return $actions;
}
add_filter('bulk_actions-edit-product','royal_custom_bulk_actions');
@yoren
Copy link
Author

yoren commented Dec 25, 2013

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