You are here

function fontyourface_provider_info in @font-your-face 7.2

Returns info about the font provider for a given font.

$font = Object: the full $font object. $info_part = String: if this is given, we only return a string instead of an array.

1 call to fontyourface_provider_info()
fontyourface_ui_theme_instructions in modules/fontyourface_ui/fontyourface_ui.module
Provides instructions for placing fonts in theme.

File

./fontyourface.module, line 109

Code

function fontyourface_provider_info($font, $info_part = NULL) {
  $provider_info = array();
  if (!empty($font->provider)) {
    $font_provider = $font->provider;
    $info_function = $font_provider . '_fontyourface_info';
    if (function_exists($info_function)) {
      $provider_info = $info_function();
    }

    // if
  }

  // if
  return empty($info_part) ? $provider_info : $provider_info[$info_part];
}