You are here

function _easy_social_variable_get_value in Easy Social 7.2

Helper function to return default values, keeping global settings in mind.

Parameters

string $name:

Return value

mixed

3 calls to _easy_social_variable_get_value()
easy_social_admin_config_main in includes/easy_social.admin.inc
Form callback. Main settings form.
easy_social_admin_summary in includes/easy_social.admin.inc
Form callback. Displays Easy Social Summary.
easy_social_form_node_type_form_alter in ./easy_social.module
Implements hook_form_FORM_ID_alter().

File

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

Code

function _easy_social_variable_get_value($name) {
  $value = variable_get($name);
  if (isset($value)) {
    return $value;
  }
  else {
    if (strpos($name, '_type') !== FALSE) {
      return variable_get_value('easy_social_global_type');
    }
    else {
      if (strpos($name, '_widgets') !== FALSE) {
        return variable_get_value('easy_social_global_widgets');
      }
    }
  }
  return variable_get_value($name);
}