You are here

function sharerich_get_service_content in Sharerich 7

Same name and namespace in other branches
  1. 7.3 sharerich.module \sharerich_get_service_content()
  2. 7.2 sharerich.module \sharerich_get_service_content()

Helper to get the service content from file or variables.

2 calls to sharerich_get_service_content()
sharerich_admin_form in ./sharerich.admin.inc
Implements hook_form().
sharerich_get_buttons in ./sharerich.module
Returns markup with list of share buttons.

File

./sharerich.module, line 205

Code

function sharerich_get_service_content($service_name) {
  $var_name = 'sharerich_custom_' . $service_name;
  $var_get = variable_get($var_name, '');
  if (!empty($var_get)) {
    $content = variable_get($var_name);
  }
  else {
    $content = sharerich_load_service($service_name);
  }
  return $content;
}