You are here

function _jquery_social_stream_vars_get in jQuery social stream 7.2

Same name and namespace in other branches
  1. 7 jquery_social_stream.js.inc \_jquery_social_stream_vars_get()

Get required vars.

2 calls to _jquery_social_stream_vars_get()
jquery_social_stream_facebook_callback in ./jquery_social_stream.js.inc
Facebook callback for social stream.
jquery_social_stream_twitter_callback in ./jquery_social_stream.js.inc
Twitter callback for social stream.

File

./jquery_social_stream.js.inc, line 1357
JS callbacks.

Code

function _jquery_social_stream_vars_get($names, $default = '') {
  $variables = array_map('unserialize', db_query('SELECT name, value FROM {variable} WHERE name IN (:names)', array(
    ':names' => $names,
  ))
    ->fetchAllKeyed());
  foreach ($names as $name) {
    if (!isset($variables[$name])) {
      $variables[$name] = $default;
    }
  }
  return $variables;
}