function fonts_com_fontyourface_disable in @font-your-face 7.2
Implements hook_fontyourface_disable().
File
- modules/
fonts_com/ fonts_com.module, line 758
Code
function fonts_com_fontyourface_disable($font) {
module_load_include('inc', 'fonts_com', 'api');
$project = variable_get('fonts_com_project', '');
$metadata = unserialize($font->metadata);
if ($project == '') {
drupal_set_message(t('Please !selectproject before disabling <i>@font</i>.', array(
'!selectproject' => l('select a project', 'admin/config/user-interface/fontyourface/fonts_com/project'),
'@font' => $font->name,
)), 'error');
return FALSE;
}
elseif (fonts_com_delete_font_from_project($metadata['details']->FontID, $project)) {
return TRUE;
}
// elseif
return FALSE;
}