Theme Functions

A Set of Useful Helper Functions

All of the functions are located in the  [theme_root]/php-inc/theme-functions.php file.


tr_a

Makes it easier to work with links.

{tr_a($link_object)}

Read More


tr_is_ie

Detects IE browser.

{tr_is_ie()}

Read More


tr_hex_to_rgb

Converts HEX to RGB.

{tr_hex_to_rgb($hex)}

Read More


tr_social_share

Generates a Social Media share link.

{tr_social_share($soc_name)}

Read More


tr_get_soc_name

Returns detected Social Media name string.

{tr_get_soc_name($soc_media_link)}

Read More


tr_get_media

Makes it easier to work with images and SVGs.

{tr_get_media($img_arr_or_path, $async_boolean)}

Read More


tr_posted_on

Prints the publish date.

{tr_posted_on($post_id, $with_last_updated)}

Read More


tr_posted_by

Prints the author’s name.

{tr_posted_by($author_id)}

Read More


tr_log

Wrapper around the var_dump function.

{tr_log($some_var)}

tr_log_i

Inline wrapper around the var_dump function.

{tr_log_i($some_var)}

tr_part

Used to include latte partials without manually concatenating the full path to the file.

{tr_part($partial_name)}
Join Our Newsletter

To get updates about Theme Redone