You are here

function advanced_forum_path_to_style in Advanced Forum 6.2

Same name and namespace in other branches
  1. 5 advanced_forum.module \advanced_forum_path_to_style()
  2. 6 advanced_forum.module \advanced_forum_path_to_style()
  3. 7.2 includes/style.inc \advanced_forum_path_to_style()

Returns the path to the advanced forum style, including the style name

File

includes/style.inc, line 30
Functions relating to the style system, not including core hooks and preprocess / theme functions.

Code

function advanced_forum_path_to_style($requested_style = NULL) {

  // Set a static variable so this is cached after the first call.
  static $style_paths = array();
  if (empty($requested_style)) {

    // If no style is passed in, assume the current style is wanted.
    $requested_style = advanced_forum_get_current_style();
  }
  if (empty($style_path)) {

    // Get the path information
    $styles = advanced_forum_get_all_styles();
    foreach ($styles as $key => $style) {
      $style_paths[$key] = $style['path'];
    }
  }
  return $style_paths[$requested_style];
}