Manages the markup for a generic set of images Extend this with your nice and candy classes!
author | etessore |
---|---|
version | 1.0.2 |
package | classes |
subpackage | image manager |
todo | remove using of FeatureWithAssets |
add_image(string | int $img) : \GalleryHelper
string
int
the image: if is an int it will be retrieved from the wp media, elsewhere it is an html tag
\GalleryHelper
$this for chainabilitycalculate_unique() : \GalleryHelper
\GalleryHelper
$this for chainabilityget_images()
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
get_images_from_closest_hotel() : \Ambigous
\Ambigous
get_images_from_closest_hotel_in_default_language() : \Ambigous
\Ambigous
get_images_from_frontpage()
get_images_from_homepage_in_default_language() : \Ambigous
\Ambigous
get_images_from_main_language(int $post_id) : \Ambigous
Uses WPML to retrieve the post translation in default language and queries it for attached images.
uses | \icl_object_id() |
---|
int
the post id you want to search for
\Ambigous
get_images_from_post(array $args) : \Ambigous
array
\Ambigous
get_markup() : \the
\the
markup for the current galleryhas_images() : boolean
Useful to check if jquery.cycle() is needed
boolean
true if there is at least two imageis_empty() : boolean
boolean
true if there is no image in the current setreplace_markup()
set_markup(string $key, string $markup) : \GalleryHelper
string
the string has to be substituted
string
html markup
\GalleryHelper
$this for chainabilityset_wp_media_dimension(string $dimension) : \GalleryHelper
If set this option will prevale on timthumb
string
WordPress media dimension name
\GalleryHelper
$this for chainabilitythe_markup()
get_image_alt(int $index)
returns | the alt attribute for the $index image of the set |
---|
int
the index of the images list
get_image_caption(int $index)
returns | the caption for the $index image of the set |
---|
int
the index of the images list
get_image_description(int $index)
returns | the description for the $index image of the set |
---|
int
the index of the images list
get_image_height(int $index)
int
the index of the images list
get_image_id(int $index)
returns | the id attribute for the $index image of the set |
---|
int
the index of the images list
get_image_path(int $index) : string
int
the index of the images list
string
path to discget_image_src(int $index)
returns | the src attribute for the $index image of the set |
---|
int
the index of the images list
get_image_title(int $index)
returns | the title attribute for the $index image of the set |
---|
int
the index of the images list
get_image_width(int $index)
int
the index of the images list
$image_number : int
$images : array
$media_dimension : string
$static_markup : array
$timthumb_opts : array
$tpl : String
$unid : string