Takes a list of n images with the same dimensions
and merges them in a unique image with sizes (n x width) and height.
Than renders an html dom to serve the big image as background of some divs
so that you can cycle it.
Methods
Initializes the object with default values
__construct()
Adds an image to the current set
add_image(string | int $img) : \GalleryHelper
Inherited
inherited_from |
\GalleryHelper::add_image() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::add_images() |
Parameters
$images
array
the list of images to be added
Returns
Calculates the cache name, dir, url and path.
cache_names() : \OneImageForAll
Inherited
inherited_from |
\OneImageForAll::cache_names() |
Returns
Calculates the unique id for the current gallery
calculate_unique() : \GalleryHelper
Inherited
inherited_from |
\GalleryHelper::calculate_unique() |
inherited_from |
\OneImageForAll::calculate_unique() |
Returns
Checks if the config has all the paramaters needed.
check_config() : \OneImageForAll
Inherited
inherited_from |
\OneImageForAll::check_config() |
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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::get_images_from_post() |
Parameters
$args
array
Returns
\Ambigous
>
(non-PHPdoc)
get_markup() : \the
Returns
\the
markup for the current gallery
get_slideshow_dimension()
get_slideshow_dimension() : string
Returns
string
the media gallery size for the slideshow
Calculates the style for the $image_id
get_style(int $image_id) : string
Inherited
inherited_from |
\OneImageForAll::get_style() |
Parameters
$image_id
int
the index of the image
Returns
string
the style html attribute
Retrives the images for the slideshow
get_the_images(int $post_id) : \Slideshow
Parameters
$post_id
int
the post id to dig in
Returns
\Slideshow
$this for chainability
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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::replace_markup() |
Set the static markup; ie: prev\next\loading divs
set_markup(string $key, string $markup) : \GalleryHelper
Inherited
inherited_from |
\GalleryHelper::set_markup() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::set_timthumb_options() |
Parameters
$options
array
Set the unique id for this gallery
set_uid(string $unid) : \GalleryHelper
Inherited
inherited_from |
\GalleryHelper::set_uid() |
inherited_from |
\OneImageForAll::set_uid() |
Parameters
Returns
Echoes the markup for the current gallery
the_markup()
Inherited
inherited_from |
\GalleryHelper::the_markup() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::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() |
inherited_from |
\OneImageForAll::get_image_width() |
Parameters
$index
int
the index of the images list
Merges the images in the current object and returns the url to the big image.
merge_images() : \OneImageForAll
Inherited
inherited_from |
\OneImageForAll::merge_images() |
Returns
Properties
stores the base directory of the cache file
$cache_dir : string
Inherited
inherited_from |
\OneImageForAll::$$cache_dir |
stores the name of the cache file
$cache_name : string
Inherited
inherited_from |
\OneImageForAll::$$cache_name |
stores the path of the cache file
$cache_path : string
Inherited
inherited_from |
\OneImageForAll::$$cache_path |
stores the url of the cache file
$cache_url : string
Inherited
inherited_from |
\OneImageForAll::$$cache_url |
stores the configuration
$config : array
Inherited
inherited_from |
\OneImageForAll::$$config |
true if you want to force cache refresh
$force_image_refresh : boolean
Inherited
inherited_from |
\OneImageForAll::$$force_image_refresh |
the maximum number of images to show
$image_number : int
Inherited
inherited_from |
\GalleryHelper::$$image_number |
inherited_from |
\OneImageForAll::$$image_number |
the list of images
$images : array
Inherited
inherited_from |
\GalleryHelper::$$images |
inherited_from |
\OneImageForAll::$$images |
to be returned when no image is available
$no_images : string
Inherited
inherited_from |
\OneImageForAll::$$no_images |
Stores some static html
$static_markup : array
Inherited
inherited_from |
\GalleryHelper::$$static_markup |
inherited_from |
\OneImageForAll::$$static_markup |
options for timthumb
$timthumb_opts : array
Inherited
inherited_from |
\GalleryHelper::$$timthumb_opts |
inherited_from |
\OneImageForAll::$$timthumb_opts |
the html template
$tpl : String
Inherited
inherited_from |
\GalleryHelper::$$tpl |
inherited_from |
\OneImageForAll::$$tpl |
the unique id for the current gallery it will be automatically created if not specified
$unid : string
Inherited
inherited_from |
\GalleryHelper::$$unid |
inherited_from |
\OneImageForAll::$$unid |