Generates a list of thumbnail each one is an anchor
to the image with 'full' media dimensions.
By default loads FancyBox so to have an eye candy popup effect.
Methods
Initializes the minigallery
__construct()
Adds an image to the current set
add_image(string | int $img) : \GalleryHelper
Inherited
inherited_from |
\GalleryHelper::add_image() |
Parameters
$img
string
int
the image: if is an int it
will be retrieved from the wp media, elsewhere it is an html tag
Returns
Add some images to the current set
add_images(array $images) : \GalleryHelper
Inherited
inherited_from |
\GalleryHelper::add_images() |
Parameters
$images
array
the list of images to be added
Returns
Calculates the unique id for the current gallery
calculate_unique() : \GalleryHelper
Inherited
inherited_from |
\GalleryHelper::calculate_unique() |
Returns
Search the media gallery for suitable images.
get_images()
Inherited
This is the order:
Check if current post has attached images
Check the default language if has attached images
Check if frontpage has attached images
Check if frontpage has attached images in default language
Build a placeholder
inherited_from |
\GalleryHelper::get_images() |
Gets images from the first post marked as 'hotel' by HotelManager
get_images_from_closest_hotel() : \Ambigous
InheritedStatic
inherited_from |
\GalleryHelper::get_images_from_closest_hotel() |
Returns
Gets images from the first post marked as 'hotel' by HotelManager in default language
get_images_from_closest_hotel_in_default_language() : \Ambigous
InheritedStatic
inherited_from |
\GalleryHelper::get_images_from_closest_hotel_in_default_language() |
Returns
Gets images attached to the frontpage
get_images_from_frontpage()
InheritedStatic
inherited_from |
\GalleryHelper::get_images_from_frontpage() |
Gets images attached to the frontpage in default language translation
get_images_from_homepage_in_default_language() : \Ambigous
InheritedStatic
inherited_from |
\GalleryHelper::get_images_from_homepage_in_default_language() |
Returns
Get the images from the main language translation of the post
get_images_from_main_language(int $post_id) : \Ambigous
InheritedStatic
Uses WPML to retrieve the post translation in default language
and queries it for attached images.
uses |
\icl_object_id() |
inherited_from |
\GalleryHelper::get_images_from_main_language() |
Parameters
$post_id
int
the post id you want to search for
Returns
Get the images attached to a post
get_images_from_post(array $args) : \Ambigous
InheritedStatic
inherited_from |
\GalleryHelper::get_images_from_post() |
Parameters
$args
array
Returns
\Ambigous
>
(non-PHPdoc)
get_markup() : \the
Returns
\the
markup for the current gallery
Check if the current gallery has one or more images
has_images() : boolean
Inherited
Useful to check if jquery.cycle() is needed
inherited_from |
\GalleryHelper::has_images() |
Returns
boolean
true if there is at least two image
Checks if the current gallery has more no images
is_empty() : boolean
Inherited
inherited_from |
\GalleryHelper::is_empty() |
Returns
boolean
true if there is no image in the current set
Set the maximum number of images to show
limit_images_number(int $number) : \GalleryHelper
Inherited
inherited_from |
\GalleryHelper::limit_images_number() |
Parameters
Returns
Replaces the markup in $this->tpl %tag%s with the one
in the corresponding value of $this->static_markup[tag].
replace_markup()
Inherited
inherited_from |
\GalleryHelper::replace_markup() |
Set the static markup; ie: prev\next\loading divs
set_markup(string $key, string $markup) : \GalleryHelper
Inherited
inherited_from |
\GalleryHelper::set_markup() |
Parameters
$key
string
the string has to be substituted
$markup
string
html markup
Returns
Set the html template for this gallery
set_template(string $tpl) : \GalleryHelper
Inherited
inherited_from |
\GalleryHelper::set_template() |
Parameters
Returns
Set the timthumb options
If set_wp_media_dimension() is called it will prevale on this.
set_timthumb_options(array $options)
Inherited
inherited_from |
\GalleryHelper::set_timthumb_options() |
Parameters
$options
array
Set the unique id for this gallery
set_uid(string $unid) : \GalleryHelper
Inherited
inherited_from |
\GalleryHelper::set_uid() |
Parameters
Returns
Echoes the markup for the current gallery
the_markup()
Inherited
inherited_from |
\GalleryHelper::the_markup() |
Checks if the $index image of the list is
a wordpress media id or an image object
get_image_alt(int $index)
Inherited
returns |
the alt attribute for the $index image of the set |
inherited_from |
\GalleryHelper::get_image_alt() |
Parameters
$index
int
the index of the images list
Checks if the $index image of the list is
a wordpress media id or an image object
get_image_caption(int $index)
Inherited
returns |
the caption for the $index image of the set |
inherited_from |
\GalleryHelper::get_image_caption() |
Parameters
$index
int
the index of the images list
Checks if the $index image of the list is
a wordpress media id or an image object
get_image_description(int $index)
Inherited
returns |
the description for the $index image of the set |
inherited_from |
\GalleryHelper::get_image_description() |
Parameters
$index
int
the index of the images list
Get the height for the n-th image of the list
get_image_height(int $index)
Inherited
inherited_from |
\GalleryHelper::get_image_height() |
Parameters
$index
int
the index of the images list
Checks if the $index image of the list is
a wordpress media id or an image object
get_image_id(int $index)
Inherited
returns |
the id attribute for the $index image of the set |
inherited_from |
\GalleryHelper::get_image_id() |
Parameters
$index
int
the index of the images list
Retrieves the path for the given image
If it is an external image it returns the src attributes
get_image_path(int $index) : string
Inherited
inherited_from |
\GalleryHelper::get_image_path() |
Parameters
$index
int
the index of the images list
Returns
string
path to disc
Checks if the $index image of the list is
a wordpress media id or an image object
get_image_src(int $index)
Inherited
returns |
the src attribute for the $index image of the set |
inherited_from |
\GalleryHelper::get_image_src() |
Parameters
$index
int
the index of the images list
Retrieves the title for the image with given index
get_image_title(int $index)
Inherited
returns |
the title attribute for the $index image of the set |
inherited_from |
\GalleryHelper::get_image_title() |
Parameters
$index
int
the index of the images list
Get the width for the n-th image of the list
get_image_width(int $index)
Inherited
inherited_from |
\GalleryHelper::get_image_width() |
Parameters
$index
int
the index of the images list
Properties
the maximum number of images to show
$image_number : int
Inherited
inherited_from |
\GalleryHelper::$$image_number |
the list of images
$images : array
Inherited
inherited_from |
\GalleryHelper::$$images |
Stores some static html
$static_markup : array
Inherited
inherited_from |
\GalleryHelper::$$static_markup |
options for timthumb
$timthumb_opts : array
Inherited
inherited_from |
\GalleryHelper::$$timthumb_opts |
the substitution template
$tpl : string
the unique id for the current gallery it will be automatically created if not specified
$unid : string
Inherited
inherited_from |
\GalleryHelper::$$unid |