You are here

function mixitup_views_default_options in MixItUp Views 7

Get default option for mixitup js.

Return value

array Array of default mixitup params.

3 calls to mixitup_views_default_options()
mixitup_views_apply in ./mixitup_views.module
Apply mixitup library to container.
views_plugin_style_mixitup_views::options_form in ./views_plugin_style_mixitup_views.inc
Render the given style.
views_plugin_style_mixitup_views::option_definition in ./views_plugin_style_mixitup_views.inc
Set default options.

File

./mixitup_views.module, line 132
Provides a Views style plugin for displaying content with Mixitup filtering.

Code

function mixitup_views_default_options($convert = FALSE) {
  $options = array(
    'selectors' => array(
      'target' => '.mix',
      'filter' => '.filter',
      'sort' => '.sort',
    ),
    'load' => array(
      'filter' => 'all',
      'sort' => 'default:asc',
    ),
    'animation' => array(
      'enable' => TRUE,
      'effects' => 'fade scale',
      'duration' => 600,
      'easing' => 'ease',
      'perspectiveDistance' => '3000px',
      'perspectiveOrigin' => '50% 50%',
      'queue' => TRUE,
      'queueLimit' => 1,
    ),
    'restrict' => array(
      'vocab' => FALSE,
      'vocab_ids' => array(),
    ),
  );

  // Allow other modules to alter the default options.
  drupal_alter('mixitup_views_default_options', $options);
  if ($convert) {
    $options = _mixitup_views_convert_from_mixitup_options($options);
  }
  return $options;
}