You are here

function fontyourface_ui_enabled_count in @font-your-face 7.2

Returns HTML for enabled font count.

4 calls to fontyourface_ui_enabled_count()
fonts_com_browse in modules/fonts_com/fonts_com.module
Over-rides default browse interface for Fonts.com.
fontyourface_ui_admin_disable_ajax in modules/fontyourface_ui/fontyourface_ui.module
Disables font based on POSTed fid.
fontyourface_ui_admin_enable_ajax in modules/fontyourface_ui/fontyourface_ui.module
Enables font based on POSTed fid.
fontyourface_ui_views_pre_render in modules/fontyourface_ui/fontyourface_ui.module
Implements hook_views_pre_render().

File

modules/fontyourface_ui/fontyourface_ui.module, line 1523

Code

function fontyourface_ui_enabled_count() {
  $enabled_count = db_select('fontyourface_font')
    ->condition('enabled', 1)
    ->countQuery()
    ->execute()
    ->fetchField();
  if ($enabled_count > 0) {
    return l(format_plural($enabled_count, '1 font currently enabled.', '@count fonts currently enabled.'), 'admin/appearance/fontyourface');
  }

  // if
  return t('@count fonts currently enabled.', array(
    '@count' => 0,
  ));
}