GB Theme Doc

Frontend

Packages

Components

Table of Contents

cookie_popup()  : mixed
Function to retrive Cookie Popup
gallery()  : mixed
Create a gallery with a given ACF gallery fields
marquee()  : mixed
Create a marquee with a given ACF text fields

Functions

Function to retrive Cookie Popup

cookie_popup() : mixed

This function it's used by theme to set cookie popup using ACF fields. Actually the fields are hardcoded:

  • opt_privacy_popup_text
  • opt_privacy_popup_title
  • opt_privacy_popup_link
Todo

Remove hardcoded fields

To refactor. Code a stand alone version

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

marquee()

Create a marquee with a given ACF text fields

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

Return Html marquee with a given text. You must choose an unique id

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

Marquee Settings

$args['field'] ( string )

ACF field text. Complex field will be parsed with field_parse()

$args['id'] ( string )

Unique id for this element

$args['speed'] ( int )

The marquee speed, negative or positive

Todo

get auto id

Use
field_parse()

to parse ACF fields

Search results