Helpers
The theme provides alot of helpers to streamline coding process and web development.
CSS Helpers
.hidden
: Simply hide the current element by applying display:none;
.
.make-wide
: Stretch the current element to take the width of the whole viewport.
.make-wide-img
: Same as above but when targeting image tags.
.row-emp
: Create an empty div to create space. The height is set to clamp(40px,4vw,60px)
.
.m0a
: Center the element horizontally by applying margin:0 auto;
to it.
.df
: Apply display:flex;
to an element.
.fww
: Apply flex-wrap:wrap;
to an element.
.jcc
: Center the contents of an element horizontally by applying justify-content:center;
to it.
.jcsb
: Apply justify-content:space-between;
to an element.
.jcfe
: Apply justify-content:flex-end;
to an element.
.aic
: Center the contents of an element vertically by applying align-items:center;
to it.
.gtr
: Apply gap: var(--gutter);
based on the value set in theme options.
.tac
: Center the text of an element by applying text-align:center;
to it.
JS Helpers
isMobile()
: Check the userAgent to see if the current device is mobile.
throttle(func, limit)
: Throttle a function's execution by x milliseconds.
addScriptElement(id, src, callback)
: Create a script element with callback feature.
addStyleElement(id, href)
: Create a style element.
removeElementById(id)
: Remove any element.
makeAjaxCall(action, data, onSuccess, onError)
: Use this helper to run an AJAX call.
Localized Data
artware_theme_options.layout_02
: Mobile breakpoint
artware_theme_options.libraries_04
: BarbaJS
artware_theme_options.libraries_12
: Google Maps
PHP Helpers
ACT::get('theme_option')
: Use this class to fetch theme options.
isMobile()
: Check the userAgent to see if the current device is mobile.
isEshop()
: Check if the WooCommerce plugin is enabled.
get_term_img()
: Every term has a featured image and you can echo it with this function.