Last active
August 29, 2015 13:58
-
-
Save balintbrews/10106819 to your computer and use it in GitHub Desktop.
Snippet to see what content types are used by your views in your Drupal site. Create a file with this content, then execute it with `drush php-script`.
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 | |
$rows = array(); | |
foreach (views_get_enabled_views() as $view) { | |
if ($view->base_table == 'node') { | |
foreach ($view->display as $display) { | |
if (isset($display->display_options['filters']['type'])) { | |
$rows[] = array( | |
sprintf('%s (%s)', $view->human_name, $view->name), | |
$display->display_title, | |
implode(',', array_keys($display->display_options['filters']['type']['value'])) | |
); | |
} | |
} | |
} | |
} | |
drush_print_table($rows); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment