You are here

function get_options_array in ShareThis 7

getOptionArray is a helper function for DB access.

Returns options that have been stored in the database.

4 calls to get_options_array()
sharethis_admin in ./sharethis.module
Implements hook_admin.
sharethis_block_contents in sharethis_block/sharethis_block.module
custom html block
sharethis_form in ./sharethis.module
This is the main configuration form for the admin page.
sharethis_node_view in ./sharethis.module
Implements hook_node_view.

File

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

Code

function get_options_array() {
  $data_options = array();
  $sql = "SELECT st.st_option, st.st_value FROM {st_table} st";
  $result = db_query($sql);
  foreach ($result as $record) {
    $data_options[$record->st_option] = $record->st_value;
  }
  return $data_options;
}