Last active
January 30, 2019 03:06
-
-
Save Bobz-zg/e0edba1a4b60edc6ae27cec9a4cbd250 to your computer and use it in GitHub Desktop.
Remove 'Category' from 'Quick edit' screen in WordPress admin
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
<?php | |
/** | |
* Filters whether the current taxonomy should be shown in the Quick Edit panel. | |
* | |
* @since 4.2.0 | |
* | |
* @param bool $show_in_quick_edit Whether to show the current taxonomy in Quick Edit. | |
* @param string $taxonomy_name Taxonomy name. | |
* @param string $post_type Post type of current Quick Edit post. | |
*/ | |
add_filter( 'quick_edit_show_taxonomy', function( $show, $taxonomy_name, $view ) { | |
// Add your logic here | |
if ( 'category' == $taxonomy_name ) | |
return false; | |
return $show; | |
}, 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment