You are here

function fontyourface_import_fonts in @font-your-face 7.2

Same name and namespace in other branches
  1. 6.2 fontyourface.module \fontyourface_import_fonts()

Runs the font import of the given provider. Triggered from the UI interface and when a provider is enabled.

4 calls to fontyourface_import_fonts()
edge_fonts_enable in modules/edge_fonts/edge_fonts.install
Implements hook_enable().
fontsquirrel_enable in modules/fontsquirrel/fontsquirrel.install
Implements hook_enable().
fontyourface_ui_settings_form_submit in modules/fontyourface_ui/fontyourface_ui.module
Handles provider imports.
google_fonts_api_enable in modules/google_fonts_api/google_fonts_api.install
Implements hook_enable().

File

./fontyourface.module, line 336

Code

function fontyourface_import_fonts($provider) {
  if (module_exists($provider)) {
    $info_function = $provider . '_fontyourface_info';
    $provider_info = $info_function();
    $import_function = $provider . '_fontyourface_import';
    if ($import_function()) {
      drupal_set_message(t('@provider import complete.', array(
        '@provider' => $provider_info['name'],
      )));
    }
  }

  // if
}