You are here

function fontyourface_set_css_selector in @font-your-face 7.2

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

Sets a font's CSS selector.

3 calls to fontyourface_set_css_selector()
fontyourface_ui_admin_edit_form_submit in modules/fontyourface_ui/fontyourface_ui.module
Edit form submit handler.
fontyourface_ui_apply_by_font_form_submit in modules/fontyourface_ui/fontyourface_ui.module
Updates CSS Selectors
fontyourface_ui_apply_by_selector_form_submit in modules/fontyourface_ui/fontyourface_ui.module
Updates Fonts.

File

./fontyourface.module, line 397

Code

function fontyourface_set_css_selector(&$font, $css_selector) {
  db_update('fontyourface_font')
    ->fields(array(
    'css_selector' => $css_selector,
  ))
    ->condition('fid', $font->fid)
    ->execute();
  $font->css_selector = $css_selector;
  $selector_function = $font->provider . '_fontyourface_selector_update';
  if (function_exists($selector_function)) {
    return $selector_function($font);
  }

  // if
}