You are here

function front_page_help in Front Page 7

Same name and namespace in other branches
  1. 8 front_page.module \front_page_help()
  2. 5 front_page.module \front_page_help()
  3. 6.2 front_page.module \front_page_help()
  4. 6 front_page.module \front_page_help()
  5. 7.2 front_page.module \front_page_help()
  6. 9.1.x front_page.module \front_page_help()

Implements hook_help().

File

./front_page.module, line 18

Code

function front_page_help($section) {
  switch ($section) {
    case 'admin/config/system/front':
      $roles = user_roles();
      $special_note = '';
      if (count($roles) >= 3) {
        krsort($roles);
        $special_note = '<fieldset>' . t('<legend><span class="fieldset-legend">front page by role usage</span></legend><div class="fieldset-wrapper"><p><strong>Note:</strong>When using the front pages by role option, please note that if a user has multiple roles the first role match will determine which front page they see. Here is the order that the roles will be checked (from left to right).</p>') . '<p>';
        foreach ($roles as $role_id => $role_name) {
          $special_note .= "<strong>{$role_id}</strong> {$role_name} |  ";
        }
        $special_note .= '</p>' . t('<p>The default setting for new roles is SAME AS AUTHENTICATED USERS.</p>') . '</div></fieldset>';
      }
      return t('<p>Setup custom front pages for your site. Click on the option to expand the form and customise your settings.</p><p><em>Anonymous User</em> = visitor not logged in  | <em>Authenticated User</em> = visitor who is logged in</p>') . $special_note;
  }
}