You are here

function fb_social_preset_load in Facebook social plugins integration 7.2

Same name and namespace in other branches
  1. 6.2 fb_social.module \fb_social_preset_load()

load the preset

Parameters

$name: the preset name

$reset:

1 call to fb_social_preset_load()
fb_social_get_presets in ./fb_social.module
Get all presets or a preset by name. By default it returns only enabled presets.
2 string references to 'fb_social_preset_load'
fb_social_schema in ./fb_social.install
Implements hook_schema().
fb_social_update_7200 in ./fb_social.install
Add new {fb_social_preset} table when upgrading from Drupal 6.x-1.x.

File

./fb_social.module, line 361

Code

function fb_social_preset_load($name = NULL, $reset = FALSE) {
  ctools_include('export');
  if ($reset) {
    ctools_export_load_object_reset('fb_social_preset');
  }
  $presets = ctools_export_load_object('fb_social_preset', 'all');
  if (isset($name)) {
    return isset($presets[$name]) ? $presets[$name] : FALSE;
  }
  return $presets;
}