-
-
Save yoren/8119873 to your computer and use it in GitHub Desktop.
Remove quickedit.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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'); |
Author
yoren
commented
Dec 25, 2013
- Post Row Actions
- Bulk Actions
- Admin Screen ID
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment