You are here

function local_fonts_delete_fontface_submit in @font-your-face 6.2

File

modules/local_fonts/local_fonts.module, line 377

Code

function local_fonts_delete_fontface_submit($form, &$form_state) {
  if ($form['#post']['op'] == t('Cancel')) {
    drupal_goto('admin/build/themes/fontyourface/edit/' . $form['fid']['#value']);
  }
  else {
    $font = fontyourface_get_font($form['fid']['#value']);
    fontyourface_delete_font($font);
    drupal_set_message(t('@font deleted.', array(
      '@font' => $font->name,
    )));
    drupal_goto('admin/build/themes/fontyourface');
  }

  // else
}