You are here

function fontyourface_disable_font in @font-your-face 7

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

Disables a single font.

2 calls to fontyourface_disable_font()
fontsquirrel_fontyourface_enable in modules/fontsquirrel/fontsquirrel.module
Implements hook_fontyourface_enable().
fontyourface_admin_edit_form_submit in ./fontyourface.module
Edit form submit handler.

File

./fontyourface.module, line 924

Code

function fontyourface_disable_font(&$font) {
  db_update('fontyourface_font')
    ->fields(array(
    'enabled' => 0,
  ))
    ->condition('fid', $font->fid)
    ->execute();
  $font->enabled = 0;
  $disable_function = $font->provider . '_fontyourface_disable';
  if (function_exists($disable_function)) {
    $disable_function($font);
  }

  // if
}