Block layout page and use any of the "Place block" buttons to create a Superfish block.', ['@block' => 'structure/block'])); } else { drupal_set_message(t('Superfish library is missing. Please refer to the plugin documentation for how you can fix this issue; Once done, go to the Block layout page and use any of the "Place block" buttons to create a Superfish block.', ['@documentation' => 'http://drupal.org/node/1125896', '@block' => 'structure/block']), 'warning'); } } /** * Implements hook_requirements(). */ function superfish_requirements($phase) { $requirements = []; if ($phase == 'runtime') { $requirements['superfish']['title'] = t('Superfish library'); if (superfish_library_check()) { $requirements['superfish']['value'] = t('Installed at @location', ['@location' => superfish_library_path()]); $requirements['superfish']['severity'] = REQUIREMENT_OK; } else { $requirements['superfish']['value'] = t('Not installed'); $requirements['superfish']['severity'] = REQUIREMENT_ERROR; $requirements['superfish']['description'] = t('Please download the Superfish library from :url.', [':url' => 'http://drupal.org/project/superfish']); } // Check the uploaded Superfish library version. if (($version = superfish_library_version()) && $version != '2.0') { $requirements['superfish']['value'] = t('Not supported'); $requirements['superfish']['severity'] = REQUIREMENT_ERROR; $requirements['superfish']['description'] = t('The Superfish library requires an update. You can find the update instructions on :url.', [':url' => 'http://drupal.org/project/superfish']); } } return $requirements; }