You are here

function yashare_admin_widget in Yandex.Share 7.2

Render Yandex.Share block for admin settings form.

1 call to yashare_admin_widget()
yashare_admin_settings in ./yashare.admin.inc
Returns settings form.

File

./yashare.admin.inc, line 295
Administration pages for the Yandex.Share module.

Code

function yashare_admin_widget($theme, $type) {
  $element = array(
    '#type' => 'yashare_widget',
    '#html_tag' => 'span',
    '#link' => url('<front>', array(
      'absolute' => TRUE,
    )),
    '#title' => variable_get('site_name', 'Drupal'),
    '#yashare_theme' => $theme,
    '#yashare_type' => $type,
  );
  $map = array(
    'default' => t('Default'),
    'dark' => t('Dark'),
    'counter' => t('Counters'),
  );
  return $map[$theme] . ' theme | ' . drupal_render($element);
}