You are here

function masonry_default_options in Masonry API 7

Same name and namespace in other branches
  1. 7.3 masonry.module \masonry_default_options()
  2. 7.2 masonry.module \masonry_default_options()

Get default Masonry options.

Return value

An associative array of default options for the jQuery Masonry plugin. Contains:

  • masonry_width_unit: The unit of measurement used for grid column widths (pixels or percentages).
  • masonry_width: The width of each grid column.
  • masonry_animated: Whether or not animations are enabled for the grid.
  • masonry_animated_duration: The duration of animations in milliseconds.
  • masonry_resizable: Whether or not the grid is re-arranged when the container is resized.
  • masonry_center: Whether or not the grid is centered in the container.
  • masonry_gutter: The amount of spacing between grid columns in pixels.
  • masonry_rtl: Whether or not grid items are displayed from right-to-left.
6 calls to masonry_default_options()
context_reaction_masonry::options_form in masonry_context/context_reaction_masonry.inc
Masonry settings form.
masonry_formatter_field_formatter_info_alter in masonry_formatter/masonry_formatter.module
Implements hook_field_formatter_info_alter().
masonry_form_search_admin_settings_alter in masonry_search/masonry_search.module
Implements hook_form_FORM_ID_alter() for search_admin_settings.
masonry_search_preprocess_search_results in masonry_search/masonry_search.module
Implements hook_preprocess_HOOK() for theme_search_results().
views_plugin_style_masonry_views_grid::options_form in masonry_views/views_plugin_style_masonry_views_grid.inc
Setup configuration form.

... See full list

File

./masonry.module, line 49
Makes the 'jQuery Masonry' plugin available to Drupal as a library.

Code

function masonry_default_options() {
  return array(
    'masonry_width_unit' => 'px',
    'masonry_width' => '200',
    'masonry_animated' => 1,
    'masonry_animated_duration' => '500',
    'masonry_resizable' => 1,
    'masonry_center' => 0,
    'masonry_gutter' => '0',
    'masonry_rtl' => 0,
  );
}