diff --git a/includes/utils.inc b/includes/utils.inc index 52d36d1..27f35e8 100644 --- a/includes/utils.inc +++ b/includes/utils.inc @@ -34,10 +34,13 @@ function kalatheme_updater_info_alter(&$updaters) { /** * Loads all dependencies necessary for Kalatheme to operate. * + * @param $display_errors + * Whether or not to display error messages when dependencies are not met. + * * @return string * Name of the function for kalatheme_status_messages to call */ -function _kalatheme_load_dependencies() { +function _kalatheme_load_dependencies($display_errors = FALSE) { // If we've already loaded dependencies, just return the correct function to // call for status messages. $dependencies_loaded = &drupal_static(__FUNCTION__); @@ -67,7 +70,7 @@ function _kalatheme_load_dependencies() { $panels = TRUE; } } - if (!$panels) { + if (!$panels && $display_errors) { drupal_set_message(t('Kalatheme requires at least Panels 3.4.'), 'error'); } @@ -82,7 +85,7 @@ function _kalatheme_load_dependencies() { $jq = TRUE; } } - if (!$jq) { + if (!$jq && $display_errors) { drupal_set_message(t('Kalatheme requires a 2.x version of JQuery Update that uses at least JQuery 1.7'), 'error'); } @@ -116,7 +119,7 @@ function _kalatheme_load_dependencies() { $boot = TRUE; } } - if (!$boot) { + if (!$boot && $display_errors) { drupal_set_message(t('You do not have a Bootstrap library installed but that is ok! To get equipped either check out our Start Up Guide or run our Setup Wizard.', array( '@setup_guide' => 'https://drupal.org/node/2167149', '@setup_url' => url('admin/appearance/kalasetup'), @@ -147,9 +150,9 @@ function kalatheme_prepare_config_form(&$form) { // Provide needed ajax wrappers $form['actions']['submit']['#prefix'] = "