You are here

function yashare_get_enabled_services in Yandex.Share 7.2

Returns enabled services.

2 calls to yashare_get_enabled_services()
yashare_admin_settings in ./yashare.admin.inc
Returns settings form.
yashare_widget_pre_render in ./yashare.module
Pre-render callback for the 'yashare_widget' element. See http://api.yandex.ru/share/doc/dg/concepts/share-button-ov.xml

File

./yashare.inc, line 135
Helper functions for the Yandex.Share module.

Code

function yashare_get_enabled_services($type = 'block', $theme = 'default') {
  $services = array_filter(variable_get('yashare_' . $type . '_services', yashare_get_default_services()));
  if ($theme != 'default') {
    foreach (yashare_services_list() as $codename => $service) {
      if (!$service[$theme]) {
        unset($services[$codename]);
      }
    }
  }
  return $services;
}