Last updated
Blade is another template engine that you can use in Advanced Views.
Important: Blade requires PHP 8.2.0 or later. You should continue using vanilla PHP or Twig if you can't change the PHP version of your website for any reason.
Using Blade over Twig is a good idea if you're a seasoned PHP developer, as Blade, unlike Twig, is closer to PHP and allows you to call any PHP (and WordPress) functions directly within the template.
For example, you can call a WordPress translate ('__') function for any string like this:
{{ __("string", "domain") }}Keep in mind that the output is escaped, so if you need to print a variable with HTML, you need to define a raw output by replacing the curly brackets with exclamation marks, like this:
{!! $my_var !!}You can read more about Blade in the official docs.
Currently Advanced Views Pro uses version 11.7.0 of the illuminate/view package.
Last updated