Created
July 22, 2015 09:49
-
-
Save KostasBlank/2ca32fdd25829ae3f2bf to your computer and use it in GitHub Desktop.
Find all views with sql rewrite disabled
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
$all_views = views_get_all_views(); | |
foreach ($all_views as $view) { | |
$displays = $view->display; | |
foreach ($displays as $views_display) { | |
$display_options = $views_display->display_options; | |
$disable_sql_rewrite = $display_options['query']['options']['disable_sql_rewrite']; | |
if ($disable_sql_rewrite) { | |
dpm($view->name . ': ' . $views_display->display_title); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment