Last active
December 30, 2015 08:49
-
-
Save JustAnotherMark/7805495 to your computer and use it in GitHub Desktop.
How to disable 'in code' Views provided by contrib modules that you're never going to use and are just cluttering up the admin lists.
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 | |
| /** | |
| * Implements hook_views_default_views_alter(). | |
| * | |
| * Disables views provided by contrib modules that are unnecessary. | |
| */ | |
| function module_name_views_default_views_alter(&$views) { | |
| // Disable the default 'tweets' view provided by the Twitter module. | |
| if (isset($views['tweets'])) { | |
| $views['tweets']->disabled = TRUE; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment