You are here

function _easy_social_get_options in Easy Social 7.2

Returns Easy Social options for use in settings forms.

Return value

array

4 calls to _easy_social_get_options()
easy_social_admin_config_main in includes/easy_social.admin.inc
Form callback. Main settings form.
easy_social_admin_order in includes/easy_social.admin.inc
Form callback. Displays Easy Social widget sorting form.
easy_social_form_node_type_form_alter in ./easy_social.module
Implements hook_form_FORM_ID_alter().
easy_social_handler_field::options_form in views/easy_social_handler_field.inc
Extra Easy Social field options form.

File

./easy_social.module, line 909
Easy social module.

Code

function _easy_social_get_options() {
  static $options;
  if (!isset($options)) {
    $widgets = easy_social_get_widgets();
    $order = variable_get_value('easy_social_global_order');
    $ordered_widgets = array();
    foreach ($order as $key) {
      $ordered_widgets[$key] = $widgets[$key];
    }
    $options = array();
    foreach ($ordered_widgets as $k => $widget) {
      $options[$k] = isset($widget['name']) ? $widget['name'] : $k;
    }
  }
  return $options;
}