GB Theme Doc

gallery.php

Gallery utility settings

Table of Contents

gallery()  : mixed
Create a gallery with a given ACF gallery fields

Functions

Create a gallery with a given ACF gallery fields

gallery([array<string|int, mixed> $args = null ]) : mixed

Return Html output of different type of galleries, from a specific acf gallery field or a group of fields

Parameters
$args ( array<string|int, mixed> )

Gallery Settings

$args['field'] ( string|array<string|int, mixed> )

ACF field ora array of field for Images source. Complex field will be parsed with field_parse() @param String|Array $args['field'] Gallery array @param String $args['gallery'] Gallery type. Avable type: boxed, slide, full-slide, vertical

$args['id'] ( string )

Gallery ID. Generate ids for images too.

$args['button'] ( string )

Button class, if empty button dosen't renderize

$args['nav'] ( string )

full | true . Buttons navigation class. if empty buttons dosen't renderize

$args['slide'] ( string )

Enable Slide support or disable it

$args['close'] ( string )

Buttons close class

$args['size'] ( string )

Image size thumb|medium|large|full (Default: large)

$args['inner'] ( string )

Inner wrapper class

$args['item'] ( string )

Item gallery class

$args['capiton'] ( string )

Add caption box indicating a class to associate

$args['description'] ( string )

Add caption description box

$args['window'] ( string )

Add target gallery window id for gallery hendler attribute

$args['attr'] ( string )

Gallery list item attribute

Todo

Button close to improve

Use
field_parse()

to parse ACF fields

field_exists()

to check ACF fields existences

Search results