You are here

function sharethis_get_options_array in ShareThis 7.2

Implements sharethis_get_options_array().

Returns options that have been stored in the database.

@TODO: Switch from this function to just straight variable_get() calls.

7 calls to sharethis_get_options_array()
sharethis_block_contents in ./sharethis.module
Implements of sharethis_block_contents().
sharethis_comment_view in ./sharethis.module
Implements hook_comment_view().
sharethis_configuration_form in ./sharethis.admin.inc
This is the main configuration form for the admin page.
sharethis_handler_field_link::renderSharethisLink in views/sharethis_handler_field_link.inc
Renders sharethis link.
sharethis_include_js in ./sharethis.module
Include st js scripts.

... See full list

File

./sharethis.module, line 232
A module that adds one of the ShareThis widget to your website.

Code

function sharethis_get_options_array() {
  $default_sharethis_nodetypes = array(
    'article' => 'article',
    'page' => 'page',
  );
  $view_modes = array();
  foreach (array_keys(node_type_get_types()) as $type) {
    $view_modes[$type] = variable_get('sharethis_' . $type . '_options', $default_sharethis_nodetypes);
  }
  return array(
    'buttons' => variable_get('sharethis_button_option', 'stbc_button'),
    'publisherID' => variable_get('sharethis_publisherID', ''),
    'services' => variable_get('sharethis_service_option', '"Facebook:facebook","Tweet:twitter","LinkedIn:linkedin","Email:email","ShareThis:sharethis","Pinterest:pinterest"'),
    'option_extras' => variable_get('sharethis_option_extras', array(
      'Google Plus One:plusone' => 'Google Plus One:plusone',
      'Facebook Like:fblike' => 'Facebook Like:fblike',
    )),
    'widget' => variable_get('sharethis_widget_option', 'st_multi'),
    'onhover' => variable_get('sharethis_option_onhover', TRUE),
    'neworzero' => variable_get('sharethis_option_neworzero', FALSE),
    'twitter_prefix' => variable_get('sharethis_twitter_prefix', ''),
    'twitter_suffix' => variable_get('sharethis_twitter_suffix', ''),
    'twitter_handle' => variable_get('sharethis_twitter_handle', ''),
    'twitter_recommends' => variable_get('sharethis_twitter_recommends', ''),
    'late_load' => variable_get('sharethis_late_load', FALSE),
    'view_modes' => $view_modes,
    'sharethis_cns' => variable_get('sharethis_cns', array(
      'donotcopy' => '0',
      'hashaddress' => '0',
    )),
    'sharethis_callesi' => NULL == variable_get('sharethis_cns') ? 1 : 0,
    'sharethis_node_types' => variable_get('sharethis_node_types', $default_sharethis_nodetypes),
    'shorten' => variable_get('sharethis_option_shorten', TRUE),
    'servicePopup' => variable_get('sharethis_option_servicepopup', FALSE),
    'fastshare' => variable_get('sharethis_fastshare', TRUE),
  );
}