A set of Blade directives for use with Roots Sage.
Util::unwrap()
which simply unwraps the passed string from the passed delimiter.Util::clean()
to combine and clean malformed arrays formed from a parsed expressions.Util::toString()
now accepts a second parameter $single
for working with flattened or malformed arrays.@image
@image
directive which echos attachment images as well as ACF field images responsively using wp_get_attachment_image()
.Util::field()
which if ACF is present, attempts to get and return a field value from get_field()
, get_sub_field()
, or get_field($field, 'option')
(in that order).Util::toString()
which attempts to convert expressions such as arrays back to strings before passing them to Blade to avoid array to string exceptions after modifying arrays passed as a Blade expression.Util::wrap()
which simply wraps the passed value in single quotes.Util::isArray()
in a simple but effective attempt to detect when an expression is an array in a conditional outside of the compiled Blade scope.README.md
.docs/installation.md
to match recent changes to the README
.Discourse
to Support
in the documentation header navigation.@sub
and @hassub
can now accept a third parameter for deeper nested arrays (e.g. @sub('images', 'sizes', 'thumbnail')
). (Fixes #12)@permalink
, @category
, @term
, @role
, and @endrole
directives.get()
to a protected function.Log1x\SageDirectives
ignore_sticky_posts
to true
when passing an array of post IDs/objects to @posts
@posts
@istrue
, @isfalse
, @isnull
, @isnotnull
, @instanceof
, @typeof
, @repeat
, @style
, @script
, @js
, @inline
, @fa
@author
, @authorurl
, @published
, @modified
, @wpautop
, @wpautokp
@posts
allowing it to accept post ID's, WP_Post
instances, or an array with a combination of the two (#8)@isfield
, @issub
, and @isoption
@condition
has been replaced with @istrue
/ @isfalse