You are here

function fontyourface_enable_font in @font-your-face 7

Same name and namespace in other branches
  1. 6.2 fontyourface.module \fontyourface_enable_font()
  2. 7.2 fontyourface.module \fontyourface_enable_font()

Enables a single font.

2 calls to fontyourface_enable_font()
fontyourface_admin_edit_form_submit in ./fontyourface.module
Edit form submit handler.
fontyourface_update_6200 in ./fontyourface.install
Implements hook_update_N().

File

./fontyourface.module, line 905

Code

function fontyourface_enable_font(&$font) {
  db_update('fontyourface_font')
    ->fields(array(
    'enabled' => 1,
  ))
    ->condition('fid', $font->fid)
    ->execute();
  $font->enabled = 1;
  $enable_function = $font->provider . '_fontyourface_enable';
  if (function_exists($enable_function)) {
    $enable_function($font);
  }

  // if
}