Return the current, full URL.
Because PHP is incompetent and unable to do so with a single server var.
| package |
Default |
|---|---|
string
Replacement for wp_enqueue_script & wp_enqueue_style. Handles cachebusting hashes.
define('WPT_ENQUEUE_STRIP_PATH', '/data/wordpress/htdocs'); \rnb\core\enqueue(get_stylesheet_directory() . '/build/client.*.js');
| package |
Default |
|---|
string
array
Returns current env, defaulting to production if none set.
| package |
Default |
|---|---|
string
Returns an image element with captions.
| package |
Default |
|---|
mixed
string
boolean
Return all relevant data for an image as an array.
| package |
Default |
|---|
mixed
string
Returns an image element.
Usage: <?=\rnb\media\image($image, 'your-size')?>
| package |
Default |
|---|
mixed
string
boolean
Returns a <time> element containing the time. Pass falsy value to format to exclude them from output.
| package |
Default |
|---|
string
string
mixedOptionally pass custom time
Prints a template. Templates can be just about anything, but they must have a function with the name you use to print the template. See sample_template() and sample_template_named_params().
| package |
Default |
|---|---|
| deprecated |
stringTemplate init function name
arrayArray without string keys, will be passed as function arguments.
mixed
Return list of files in path relative to current file.
| package |
Default |
|---|
string
Load templates from dir using glob.
Usage: load_glob(dirname(FILE) . '/templates/*')
| package |
Default |
|---|
string
Outputs a template. Templates are just functions that you can give parameters.
See sample_template() and sample_template_named_params().
| package |
Default |
|---|
string
array
Returns a <a> element containing the permalink.
| package |
Default |
|---|
mixed
string
Sample template for those unsure. This is the template init function, you could use classes if you wanted. Usage: <?=\rnb\template\get('\rnb\template\sample_template', ['Hello', 'world!']);
| package |
Default |
|---|
string
string
Sample template using "named parameters". Usage: <?=\rnb\template\get('\rnb\template\sample_template_named_params', [['title' => 'Hello world!']]);
| package |
Default |
|---|
array
Return template instead of printing it. Uses get() internally.
| package |
Default |
|---|---|
| deprecated |
stringFunction name
arrayAnything you pass with this array will be used as function parameters for the template.
Return the excerpt as a template tag, using get_excerpt().
| package |
Default |
|---|
mixed
boolean
Return post excerpt. Tries to get a dedicated custom field first, then falls back to native excerpt and finally gets a preview from content unless told not to.
| package |
Default |
|---|
mixed
boolean
Return a field from ACF options page using the current language.
You must construct your option pages like this: Base: http://i.imgur.com/8ypMOjx.png Actual options, do for every language: http://i.imgur.com/uwvsgMj.png
| package |
Default |
|---|
string
string
boolean