Created
April 11, 2016 12:15
-
-
Save SirDarcanos/da1c464cf27c51400d3aaa0135d1203f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
add_filter( 'post_row_actions', 'remove_duplicate_capability', 20, 2 ); | |
add_filter( 'page_row_actions', 'remove_duplicate_capability', 20, 2 ); | |
function remove_duplicate_capability( $actions, $post ) { | |
if ( $post->post_type != 'product' ) { | |
return $actions; | |
} | |
if ( isset( $actions['duplicate'] ) ) { | |
unset( $actions['duplicate'] ); | |
} | |
return $actions; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment