You are here

function photoswipe_get_default_settings in PhotoSwipe 7.2

Same name and namespace in other branches
  1. 7 photoswipe.module \photoswipe_get_default_settings()

Get photoswipe default settings.

See also

http://photoswipe.com/documentation/options.html

1 call to photoswipe_get_default_settings()
photoswipe_load_assets in ./photoswipe.module
Loads photoswipe assets.

File

./photoswipe.module, line 347
Photswipe integration with Drupal module.

Code

function photoswipe_get_default_settings() {
  $settings = array(
    //'index' => 0,

    //'getThumbBoundsFn' => NULL,
    'showAnimationDuration' => 333,
    'hideAnimationDuration' => 333,
    'showHideOpacity' => FALSE,
    'bgOpacity' => 1,
    'spacing' => 0.12,
    'allowPanToNext' => TRUE,
    'maxSpreadZoom' => 2,
    //'getDoubleTapZoom' => NULL,
    'loop' => TRUE,
    'pinchToClose' => TRUE,
    'closeOnScroll' => TRUE,
    'closeOnVerticalDrag' => TRUE,
    'mouseUsed' => FALSE,
    'escKey' => TRUE,
    'arrowKeys' => TRUE,
    'history' => TRUE,
    //'galleryUID' => 1,
    'errorMsg' => '<div class="pswp__error-msg">' . t('<a href="%url%" target="_blank">The image</a> could not be loaded.') . '</div>',
    'preload' => array(
      1,
      1,
    ),
    'mainClass' => NULL,
    //'getNumItemsFn' => NULL,
    'focus' => TRUE,
  );

  // Add ability to override default settings using hook_photoswipe_default_settings_alter().
  drupal_alter('photoswipe_default_settings', $settings);
  return $settings;
}