You are here

function fontyourface_enable_font in @font-your-face 7.2

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

Enables a single font.

4 calls to fontyourface_enable_font()
fonts_com_enable_from_active_project in modules/fonts_com/fonts_com.module
Enables fonts locally based on the current active project.
fontyourface_ui_admin_edit_form_submit in modules/fontyourface_ui/fontyourface_ui.module
Edit form submit handler.
fontyourface_ui_admin_enable_ajax in modules/fontyourface_ui/fontyourface_ui.module
Enables font based on POSTed fid.
fontyourface_ui_admin_enable_form_submit in modules/fontyourface_ui/fontyourface_ui.module
Enable form submit handler.

File

./fontyourface.module, line 355

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)) {
    return $enable_function($font);
  }

  // if
  return TRUE;
}