$templates_path
$templates_path : string
Class JB_Functions
$templates_path : string
$theme_templates : string
$is_permalinks : bool
$scrips_prefix : string
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.
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: ''). |
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.
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: ''). |
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
string | $template_name | Template name. |
string | $module | Module slug. (default: ''). |
string | $template_path | Template path. (default: ''). |
string | $default_path | Default path. (default: ''). |
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.
string|array | $template_locations | Template file(s) to search for, in order. |
string | $custom_path | Custom path to the JB templates. |
The template filename if one is located.
get_email_template_module(string $email_key) : bool|string
Getting module slug for email notification.
string | $email_key | Email Notification key. |
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.