You are here

google_fonts_api.install in @font-your-face 6.2

Removes fonts on disable.

File

modules/google_fonts_api/google_fonts_api.install
View source
<?php

/**
 * @file
 * Removes fonts on disable.
 */

/**
 * Implements hook_enable().
 */
function google_fonts_api_enable() {

  // Weight must be above @font-your-face weight so preprocess comes after
  db_query("UPDATE {system} SET weight = 1 WHERE name = 'google_fonts_api'");

  // Import/update fonts
  fontyourface_import_fonts('google_fonts_api');
}

// google_fonts_api_enable

/**
 * Implements hook_disable().
 */
function google_fonts_api_disable() {
  fontyourface_provider_disable('google_fonts_api');
}

// google_fonts_api_disable

/**
 * Implements hook_update_N().
 */
function google_fonts_api_update_6200() {

  // Fonts need to be re-imported after change in issue #1123340.
  drupal_set_message(t('You may need to !import Google Fonts after this update.', array(
    '!import' => l(t('re-import'), 'admin/config/user-interface/fontyourface'),
  )), 'warning');
}

// google_fonts_api_update_6200