public static function check_every_plugin_syntax()
{
$failed_plugins = array();
$all_plugins = self::list_all();
foreach ($all_plugins as $file) {
$error = '';
if (!Utils::php_check_file_syntax($file, $error)) {
Session::error(_t('Attempted to load the plugin file "%s", but it failed with syntax errors. <div class="reveal">%s</div>', array(basename($file), $error)));
$failed_plugins[] = $file;
}
}
Options::set('failed_plugins', $failed_plugins);
Plugins::set_present();
return count($failed_plugins) > 0 ? false : true;
}