Properties

$templates_path

$templates_path : string

Type

normal

$theme_templates

$theme_templates : string

Type

normal

$is_permalinks

$is_permalinks : bool

Type

normal — CPU Links Structure

$scrips_prefix

$scrips_prefix : string

Type

normal — Standard or Minified versions

Methods

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

helptip()

helptip(string  $tip) : bool|string

Forms labels helptips

Parameters

string $tip

Returns

bool|string

get_allowed_html()

get_allowed_html(string  $context = '') : array

Parameters

string $context

Returns

array

setcookie()

setcookie(string  $name, string  $value = '', int  $expire, string  $path = '') : mixed

Disable page caching and set or clear cookie

Parameters

string $name
string $value
int $expire
string $path

Returns

mixed

get_current_url()

get_current_url(bool  $no_query_params = false) : mixed|void

Get the current URL anywhere.

Parameters

bool $no_query_params

Returns

mixed|void

array_insert_after()

array_insert_after(array  $haystack, string  $key, array  $insert_array) : array

Easy merge arrays based on parent array key. Insert after selected key

Parameters

array $haystack
string $key
array $insert_array

Returns

array

template_path()

template_path(string  $module = '') : string

Get the template path inside theme or custom path

Parameters

string $module

Module slug. (default: '').

Returns

string

default_templates_path()

default_templates_path(string  $module = '') : string

Get the default template path inside wp-content/plugins/

Parameters

string $module

Module slug. (default: '').

Returns

string

get_template_part()

get_template_part(string  $template_name, array  $args = array(), string  $module = '', string  $template_path = '', string  $default_path = '') : mixed

Get JobBoardWP custom templates (e.g. jobs list) passing attributes and including the file.

Parameters

string $template_name

Template name.

array $args

Arguments. (default: array).

string $module

Module slug. (default: '').

string $template_path

Template path. (default: '').

string $default_path

Default path. (default: '').

Returns

mixed

get_template_html()

get_template_html(string  $template_name, array  $args = array(), string  $module = '', string  $template_path = '', string  $default_path = '') : string

Like get_template, but returns the HTML instead of outputting.

Parameters

string $template_name

Template name.

array $args

Arguments. (default: array).

string $module

Module slug. (default: '').

string $template_path

Template path. (default: '').

string $default_path

Default path. (default: '').

Returns

string

locate_template()

locate_template(string  $template_name, string  $module = '', string  $template_path = '', string  $default_path = '') : string

Locate a template and return the path for inclusion.

This is the load order:

yourtheme/$blog_id/$locale/$template_path/$template_name yourtheme/$blog_id/$template_path/$template_name yourtheme/$locale/$template_path/$template_name yourtheme/$template_path/$template_name $default_path/$template_name

where $locale is site_locale for regular templates, but $user_locale for email templates

Parameters

string $template_name

Template name.

string $module

Module slug. (default: '').

string $template_path

Template path. (default: '').

string $default_path

Default path. (default: '').

Returns

string

locate_template_custom_path()

locate_template_custom_path(string|array  $template_locations, string  $custom_path) : string

Retrieve the name of the highest priority template file that exists in custom path.

Parameters

string|array $template_locations

Template file(s) to search for, in order.

string $custom_path

Custom path to the JB templates.

Returns

string —

The template filename if one is located.

get_email_template()

get_email_template(string  $email_key, bool  $with_ext = true) : string

Parameters

string $email_key
bool $with_ext

Returns

string

get_email_template_module()

get_email_template_module(string  $email_key) : bool|string

Getting module slug for email notification.

Parameters

string $email_key

Email Notification key.

Returns

bool|string —

false If email key doesn't exist in the email notifications list '{empty_string}' or '{module_slug}' For core email notification or email notification inside the module.

undash()

undash(string  $slug) : string

Undash string. Easy operate

Parameters

string $slug

Returns

string

get_job_salary_format()

get_job_salary_format(mixed  $context = '') : string

Get the price format depending on the currency position.

Parameters

mixed $context

Returns

string

define()

define(string  $name, string|bool  $value) : mixed

Define constant if not already set.

Parameters

string $name

Constant name.

string|bool $value

Constant value.

Returns

mixed