HUE Functions

Popup Link: Onepager
Normal Link: Masonry

 

Helper functions:
located in hue/hue/helper-functions.php

get_slug($post_id = 0);
Returns the slug of the current post or a post by $post_id.

the_slug($post_id = 0);
Prints the slug of the current post or a post by $post_id.

get_content_by_id($post_id);
Returns the content of a post by $post_id.

the_content_by_id($post_id);
Prints the content of a post by $post_id.

getEmailLink($link, $text = "", $classes = "");
Returns a scraper secure email link.

getPhoneLink($number, $text = "", $classes = "");
Returns an auto-formatted phone link.

filterTextForLinks($text);
Returns a text where all email links are replaced with scraper secure email links and makes links out of phone numbers.

filterTheContentForLinks();
Returns the_content() where all email links are replaced with scraper secure email links and makes links out of phone numbers.

hueMailToLink($email, $subject = "", $body = "");
Returns a mailto-link. Subject and Body gets stripped of html and line breaks are converted to new lines.

generate_random_string($length = 5);
Returns a random string (0-9a-zA-Z)

hue_format_size_units($bytes)
Returns bytes formatted as readable units

sendAdminEmail($title, $message);
Send a debug message to admin email.

hueDebugMessage($message, $outputjs = false);
Prints a string to html or js console.

hueVarDump($var, $outputjs = false);
Prints a var_dump to html or js console.

hue_is_plugin_active($plugin_file_path);
Checks if a plugin is active. P.e. ‚plugin-directory/plugin-file.php‘

 

HUE functions:
located in hue/php/hue-functions.php

printImage($image_id, $image_size, $classes = '', $caption = false);
Prints an image by ID.
– use $caption = true for caption on hover
– use class „lightbox-01“ for enabling lightbox when module „lightbox“ is loaded. lightboxes with same id („-01“) on the same page open in same window.
– use class „zoom“ for enabling image zoom when module „zoom“ is loaded. When lightbox class is set lightbox image gets zoomed and not the preview.

printThumbnail($image_size, $classes = '', $caption = false);
Prints the_post_thumbnail().

renderBackgroundImage($image_id, $image_size, $classes = '');
Prints a div.background-image with according aspect ratio.

renderACFSlideshow($field_slug, $image_size, $classes = "", $lazy_load = true);
Prints ACF gallery as slideshow.
– use class „lightbox-id“ for enabling lightbox when module „lightbox“ is loaded. lightboxes with same id („-01“) on the same page open in same window.
– use class „zoom“ for enabling image zoom when module „zoom“ is loaded

renderACFGallery($field_slug, $image_size);
Prints ACF gallery as grid.

renderHTMLVideo($mp4_file, $poster = "", $classes = "", $parameter = "", $width = 1920, $height = 1080 );
Render HTML5 video. P.e. $parameter = „autoplay loop muted playonclick“

renderHTMLAudio($audio_file, $classes = "", $parameter = "controls");
Render HTML5 audio. P.e. $parameter = „controls autoplay loop muted“

printSVG($file_name);
Prints a svg file directly into html from hue/img folder.

printCategoryList($post_id, $category_name);
Prints a category list.

hue_get_back_link();
Prints a back link.

renderACFMap($field_slug, $height);
Prints a GMap.

renderACFVideo($field_slug);
Prints ACF oEmbed.

 

Examples:

Featured Image:
printThumbnail('fullwidth');



Image:
printImage(287, 'fullwidth');



Background Image:
renderBackgroundImage(287, 'fullwidth');

 


Slideshow:
renderACFSlideshow('field-name', 'image-size-slug', 'classes');



Gallery:
renderACFGallery('field-name', 'image-size-slug');



Google Maps:
renderACFMap('field-name', height-in-px);

Google Maps

Mit dem Laden der Karte akzeptieren Sie die Datenschutzerklärung von Google.
Mehr erfahren

Karte laden



Oembed Video:
renderACFVideo('field-name');

YouTube

Mit dem Laden des Videos akzeptieren Sie die Datenschutzerklärung von YouTube.
Mehr erfahren

Video laden



HTML5 Video:
renderHTMLVideo();

 


HTML5 Audio:
renderHTMLAudio();



Background Image:
renderBackgroundImage();