Sage Directives Versions Save

A set of Blade directives for use with Roots Sage.

v1.1.3

4 years ago

Change log

Enhancements

  • Added @hasposts and @endhasposts directives.
  • Added @noposts and @endnoposts directives. (#18)

v1.1.2

4 years ago

Change log

Bug fixes

  • Use Collection::put() instead of Collection::replace() to maintain backwards compatibility.

v1.1.1

4 years ago

Change log

Enhancements

  • Added Util::unwrap() which simply unwraps the passed string from the passed delimiter.
  • Added 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.

Bug fixes

  • Fix passing an array as the third parameter to @image

v1.1.0

4 years ago

Change log

Enhancements

  • Added @image directive which echos attachment images as well as ACF field images responsively using wp_get_attachment_image().
  • Added 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).
  • Added 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.
  • Added Util::wrap() which simply wraps the passed value in single quotes.
  • Added 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.
  • Bump dependencies.
  • Clean up README.md.
  • Update docs/installation.md to match recent changes to the README.
  • Change Discourse to Support in the documentation header navigation.
  • Other small clean up.

Bug fixes

  • Fix documentation styles with the new VuePress.
  • Only pull the Google font weights we're actually using on the documentation.

v1.0.9

4 years ago

Change log

Enhancements

  • Add @action, @filter, @wphead, @wpfoot, and @bodyclass directives (#17)
  • Add linting to codebase
  • Update docs
  • Bump dependencies

Bug fixes

  • Fix possible issues when using double quotes instead of single quotes in certain directives

v1.0.8

5 years ago

Changelog

Enhancements

  • Use a better method of getting Sage 10's Blade compiler.

Bug Fixes

  • Remove an unused @asset implementation that clashes with Sage 10.

v1.0.7

5 years ago

Changelog

Enhancements

  • Add Sage 10 support 🎈
  • @sub and @hassub can now accept a third parameter for deeper nested arrays (e.g. @sub('images', 'sizes', 'thumbnail')). (Fixes #12)
  • New @permalink, @category, @term, @role, and @endrole directives.

Bug Fixes

  • Change get() to a protected function.
  • Fix a few typos in the docs. (Fixes #13)

v1.0.6

5 years ago

Changelog

Enhancements

Bug Fixes

  • Set ignore_sticky_posts to true when passing an array of post IDs/objects to @posts
  • Properly return the collection array when passing post IDs/objects to @posts

v1.0.5

5 years ago

Changelog

Bug Fixes

  • Change is_number() to is_numeric() (oops)
  • Fix @published typo on README

v1.0.4

5 years ago

Changelog

Features

  • Added 12+ new helper directives: @istrue, @isfalse, @isnull, @isnotnull, @instanceof, @typeof, @repeat, @style, @script, @js, @inline, @fa
  • Added 6 new WordPress directives: @author, @authorurl, @published, @modified, @wpautop, @wpautokp
  • Refactored @posts allowing it to accept post ID's, WP_Post instances, or an array with a combination of the two (#8)
  • Refactored source code DocBlocks and formatting of directives
  • Improved formatting and examples for documentation

Bug Fixes

  • Fix missing closing parenthesis in fields directive (#7)
  • Added missing parameters to allow passing an array key to @isfield, @issub, and @isoption

Breaking Change

  • @condition has been replaced with @istrue / @isfalse