You are here

function _service_links_load_settings in Service links 7.2

Same name and namespace in other branches
  1. 6.2 service_links.module \_service_links_load_settings()

Load the static settings and keep clear the render function.

6 calls to _service_links_load_settings()
panel_service_links_render in plugins/content_types/service_links.inc
Helper function to render the output of the pane.
service_links_render in ./service_links.module
Function that render all the selected services.
service_links_render_some in ./service_links.module
This function render only the services requested by their id.
service_links_service_links_content_type_edit_form in plugins/content_types/service_links.inc
The form to add or edit a service_links as content.
service_links_service_links_content_type_edit_form_submit in plugins/content_types/service_links.inc
Store the service_links selection.

... See full list

File

./service_links.module, line 956
Adds social network links to the content.

Code

function _service_links_load_settings() {
  static $settings = NULL;
  if (!isset($settings)) {
    $settings['short_links_use'] = variable_get('service_links_short_links_use', SERVICE_LINKS_SHORT_URL_USE_NEVER);
    $settings['attributes'] = array(
      'rel' => 'nofollow',
    );
    if (variable_get('service_links_new_window', 0)) {
      $settings['attributes'] += array(
        'target' => '_blank',
      );
    }
    $settings['style'] = variable_get('service_links_style', SERVICE_LINKS_STYLE_TEXT);
    $settings['link_weight'] = variable_get('service_links_weight', array());
    $settings['link_show'] = array_filter(variable_get('service_links_show', array()));
    $settings['text_to_append'] = strip_tags(variable_get('service_links_append_to_url', ''));
    $settings['title_override'] = variable_get('service_links_override_title', SERVICE_LINKS_TAG_TITLE_NODE);
    $settings['title_text'] = variable_get('service_links_override_title_text', '<title>');
    $settings['link_to_front'] = FALSE;
  }
  return $settings;
}