You are here

function facebook_album_get_settings in Facebook Album 7.3

Same name and namespace in other branches
  1. 7 facebook_album.module \facebook_album_get_settings()
  2. 7.2 facebook_album.module \facebook_album_get_settings()

Takes all customized settings and returns them as an array per block.

Parameters

$delta: The block delta.

Return value

array Settings as specified from the settings menu in facebook_album.admin.inc

5 calls to facebook_album_get_settings()
facebook_album_ajax_get_albums_next in ./facebook_album.module
Fetch the next or previous set of cover photos from the specified page ID.
facebook_album_ajax_get_album_next in ./facebook_album.module
Fetch the next or previous set of photos from the specified album
facebook_album_ajax_get_photo_url in ./facebook_album.module
Fetch an individual photo url from a Facebook album photo
facebook_album_block_configure in ./facebook_album.module
Implements hook_block_configure().
facebook_album_block_view in ./facebook_album.module
Implements hook_block_view().

File

./facebook_album.module, line 295

Code

function facebook_album_get_settings($delta) {
  $settings = variable_get('facebook_album_' . $delta, []);
  $display_settings = isset($settings['display_settings']) ? $settings['display_settings'] : [];
  return [
    'delta' => $delta,
    'pageID' => isset($settings['facebook_album_pageID']) ? $settings['facebook_album_pageID'] : 'acromediainc',
    'visibility' => isset($settings['facebook_album_visibility']) ? $settings['facebook_album_visibility'] : 0,
    'albums' => isset($settings['facebook_album_albums']) ? $settings['facebook_album_albums'] : [],
    'albumLimit' => isset($display_settings['facebook_album_albumLimit']) ? $display_settings['facebook_album_albumLimit'] : 3,
    'showDescription' => isset($display_settings['facebook_album_showDescription']) ? $display_settings['facebook_album_showDescription'] : 1,
    'showLocation' => isset($display_settings['facebook_album_showLocation']) ? $display_settings['facebook_album_showLocation'] : 1,
    'albumThumbWidth' => isset($display_settings['facebook_album_albumThumbWidth']) ? $display_settings['facebook_album_albumThumbWidth'] : 365,
    'albumThumbHeight' => isset($display_settings['facebook_album_albumThumbHeight']) ? $display_settings['facebook_album_albumThumbHeight'] : 250,
    'photoThumbWidth' => isset($display_settings['facebook_album_photoThumbWidth']) ? $display_settings['facebook_album_photoThumbWidth'] : 160,
    'photoThumbHeight' => isset($display_settings['facebook_album_photoThumbHeight']) ? $display_settings['facebook_album_photoThumbHeight'] : 120,
    'colorbox' => isset($display_settings['colorbox']['facebook_album_colorboxOptions']) ? $display_settings['colorbox']['facebook_album_colorboxOptions'] : '',
    'access_token' => variable_get('facebook_album_access_token', ''),
  ];
}