You are here

function features_help in Features 7.2

Same name and namespace in other branches
  1. 8.4 features.module \features_help()
  2. 8.3 features.module \features_help()
  3. 6 features.module \features_help()
  4. 7 features.module \features_help()

Implements hook_help().

File

./features.module, line 366
Main *.module file for the 'features' module.

Code

function features_help($path, $arg) {
  switch ($path) {
    case 'admin/help#features':

      // Use dirname(__FILE__) instead of __DIR__ for PHP < 5.3 (ouch).
      $path_to_readme = dirname(__FILE__) . '/README.txt';
      if (!is_readable($path_to_readme) || !is_file($path_to_readme)) {

        // The README.txt is not readable, or does not exist.
        // This can happen in sites that remove or hide README.txt files on
        // deployment. See #2473935.
        return NULL;
      }
      $output = file_get_contents($path_to_readme);
      return module_exists('markdown') ? filter_xss_admin(module_invoke('markdown', 'filter', 'process', 0, -1, $output)) : '<pre>' . check_plain($output) . '</pre>';
    case 'admin/build/features':
      return '<p>' . t('A "Feature" is a certain type of Drupal module which contains a package of configuration that, when enabled, provides a new set of functionality for your Drupal site. Enable features by selecting the checkboxes below and clicking the Save configuration button. If the configuration of the feature has been changed its "State" will be either "overridden" or "needs review", otherwise it will be "default", indicating that the configuration has not been changed. Click on the state to see more details about the feature and its components.') . '</p>';
  }
}