WordPlate includes a variety of “helper” PHP functions. You are free to use them in your own applications if you find them convenient.
WordPlate support both Laravel’s collections and helper methods. This means you can use great debugging methods such as
dd() and string helpers like
Below is a list of all supported helper methods.
base_path() function returns the fully qualified path to the project root. You may also use the
base_path() function to generate a fully qualified path to a given file relative to the project root directory.
$path = base_path(); $path = base_path('vendor/bin');
info() function retrieves information about the current site. Shorthand for WordPress
$url = info('url');
stylesheet_path() function returns the fully qualified path for the current/child theme directory.
$path = stylesheet_path(); $path = stylesheet_path('components/article.php');
template_path() function returns the fully qualified path to the current theme directory or to the parent theme if a child theme is being used.
$path = template_path(); $path = template_path('components/article.php');