Functions

current_url

Return the current, full URL.

Because PHP is incompetent and unable to do so with a single server var.

package

Default

Response

string

« More »

enqueue

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

Arguments

$path

string

$deps

array

« More »

env

Returns current env, defaulting to production if none set.

package

Default

Response

string

« More »

init

Run wordpress-tools core operations.

package

Default

« More »

is_dev

Return wether env is development or not.

package

Default

Response

boolean

« More »

is_prod

Return wether env is production or not.

package

Default

Response

boolean

« More »

register_strings

Registers Polylang strings. Must be called in admin.

package

Default

« More »

slugify

Return string in slugish format. Useful for creating HTML ids and such.

package

Default

Arguments

$string

string

Response

string

« More »

tag

Concats strings and arrays into one string. Useful for tags.

package

Default

Arguments

$parts

\rnb\core\mixe}

$glue

string

Response

string

« More »