Skip to content

Instantly share code, notes, and snippets.

@WerdsWords
Last active December 19, 2015 21:39
Show Gist options
  • Save WerdsWords/6021322 to your computer and use it in GitHub Desktop.
Save WerdsWords/6021322 to your computer and use it in GitHub Desktop.
#5: post_row_actions
<?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 wpdocs_no_posts_quickedit( $actions, $post ) {
// If the post_type is 'post', and the Quick Edit row action is set
if ( 'post' == $post->post_type && isset( $actions['inline hide-if-no-js'] ) )
unset( $actions['inline hide-if-no-js'] );
return $actions;
}
add_filter( 'post_row_actions', 'wpdocs_no_posts_quickedit', 10, 2 );
@WerdsWords
Copy link
Author

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