Site icon Osclass Documentation & Knowledge Base

hUtils.php

__get($key) – Getting from View the $key index

osc_get_param($key) – Get variable from $_REQUEST[$key]

osc_field($item, $field, $locale) – Generic function for view layer, return the $field of $item

osc_show_widgets($location) – Print all widgets belonging to $location

osc_show_recaptcha($section = ) – Print recaptcha html, if $section = “recover_password”

osc_format_date($date) – Formats the date using the appropiate format.

osc_escape_string($string) – Ecapes letters and numbers of a string

osc_private_user_menu($options = null) – Prints the user’s account menu

osc_highlight($txt, $len = 300, $start_tag = ‘‘, $end_tag = ‘‘) – Gets prepared and shortened text

osc_get_http_referer() – Returns $_SERVER[‘HTTP_REFERER’] if exists and is not empty. Otherwise it’s empty string.

osc_add_route($id, $regexp, $url, $file, $user_menu = false, $location = “custom”, $section = “custom”, $title = “Custom”) – Define new route in Rewrite class. Usually used in plugins to define new custom links.

Helpers for subdomains

osc_get_subdomain_params() – Set current subdomain parameter into array. There can only be 1 array key at same time!

osc_subdomains_filter_conditions() – Generate array with details about subdomain and filter conditions those can be applied to filter data.