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

$classes

$classes : array

Type

normal — all plugin's classes

$instance

$instance : self

Type

normal — The single instance of the class

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

instance()

instance() : self

Main JB Instance

Ensures only one instance of JB is loaded or can be loaded.

Returns

self

__clone()

__clone() : mixed

Cloning is forbidden.

Returns

mixed

__wakeup()

__wakeup() : mixed

Unserializing instances of this class is forbidden.

Returns

mixed

jb_construct()

jb_construct() : mixed

JB pseudo-constructor.

Returns

mixed

jb__autoloader()

jb__autoloader(string  $class_name) : mixed

Autoload JB classes handler

Parameters

string $class_name

Returns

mixed

localize()

localize() : mixed

Loading JB textdomain

'jobboardwp' by default

Returns

mixed

includes()

includes() : void

Include required core files used in admin and on the frontend.

modules()

modules() : \jb\Modules

Returns

\jb\Modules

module()

module( $slug) : bool|mixed

Get single module API

Parameters

$slug

Returns

bool|mixed

core_loaded_trigger()

core_loaded_trigger() : mixed

Returns

mixed

integrations()

integrations() : \jb\integrations\Init

Returns

\jb\integrations\Init

config()

config() : \jb\Config

Getting the Config class instance

Returns

\jb\Config

install()

install() : \jb\admin\Install

Getting the "Install" class instance

Returns

\jb\admin\Install

options()

options() : \jb\common\Options

Getting the Options class instance

Returns

\jb\common\Options

common()

common() : \jb\common\Init

Getting the Common class instance

Returns

\jb\common\Init

admin()

admin() : \jb\admin\Init

Getting the Admin class instance

Returns

\jb\admin\Init

frontend()

frontend() : \jb\frontend\Init

Getting the Frontend class instance

Returns

\jb\frontend\Init

ajax()

ajax() : \jb\ajax\Init

Getting the AJAX class instance

Returns

\jb\ajax\Init

call_class()

call_class(string  $class_name) : mixed

Parameters

string $class_name

Returns

mixed

widgets_init()

widgets_init() : mixed

Init widgets.

Returns

mixed

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

define_constants()

define_constants() : mixed

Define JobBoardWP Constants.

Returns

mixed