\UM_Functions

Class UM_Functions

Summary

Methods
Properties
Constants
__construct()
is_ajax()
check_ajax_nonce()
is_request()
tooltip()
excluded_taxonomies()
get_template()
locate_template()
cpt_list()
array_insert_before()
clean_array()
str_replace_first()
get_allowed_html()
$store_url
$request_timeout
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$store_url

$store_url : string

Store URL

Type

normal

$request_timeout

$request_timeout : int

WP remote Post timeout

Type

normal

Methods

__construct()

__construct() : mixed

UM_Functions constructor.

Returns

mixed

is_ajax()

is_ajax() : bool

Check if AJAX now

Returns

bool

check_ajax_nonce()

check_ajax_nonce(bool  $action = false) : mixed

Check frontend nonce

Parameters

bool $action

Returns

mixed

is_request()

is_request(string  $type) : bool

What type of request is this?

Parameters

string $type

String containing name of request type (ajax, frontend, cron or admin)

Returns

bool

tooltip()

tooltip(string  $tip, bool  $allow_html = false, bool  $echo = true) : string

Help Tip displaying

Function for render/displaying UltimateMember help tip

Parameters

string $tip

Help tip text

bool $allow_html

Allow sanitized HTML if true or escape

bool $echo

Return HTML or echo

Returns

string

excluded_taxonomies()

excluded_taxonomies() : mixed|void

Returns

mixed|void

get_template()

get_template(string  $template_name, string  $basename = '', array  $t_args = array(), bool  $echo = false) : string|void

Output templates

Parameters

string $template_name
string $basename

(default: '')

array $t_args

(default: array())

bool $echo

Returns

string|void

locate_template()

locate_template(string  $template_name, string  $path = '') : string

Locate a template and return the path for inclusion.

Parameters

string $template_name
string $path

(default: '')

Returns

string

cpt_list()

cpt_list() : array

Returns

array

array_insert_before()

array_insert_before(array  $array, string  $key, array  $insert_array) : array

Parameters

array $array
string $key
array $insert_array

Returns

array

clean_array()

clean_array( $var) : array|string

Parameters

$var

Returns

array|string

str_replace_first()

str_replace_first(string  $search, string  $replace, string  $subject) : string

Replace the first match in the string, alternative for the `str_replace()` function

Parameters

string $search
string $replace
string $subject

Returns

string

get_allowed_html()

get_allowed_html(string  $context = '') : array

Parameters

string $context

Returns

array