log1x/sage-directives
Sage Directives adds a collection of handy Laravel Blade directives to Sage 10 WordPress themes—@role, @user, @post, @loop, @title, @thumbnail, @svg and more—letting you write cleaner templates with familiar WordPress and Laravel helpers instead of verbose PHP.
add_action/add_shortcode-style Blade directives and repeated get_field() echo blocks in WordPress themes. Adopting it converts weeks of bespoke glue code into a dependency — a straightforward buy.@image options when values are empty strings, variables, or function calls) directly affects templates where image sizing/attributes are driven by ACF fields or computed values rather than hardcoded strings. If your roadmap includes responsive image sets, art direction, or per-block image controls authored by editors, this fix is a prerequisite, not a nice-to-have.Adopt when most of these hold:
illuminate/view) — the package assumes Blade, not Laravel's HTTP stack.@field, @sub, @image, @repeater, @group, @options, @shortcode, @hasfield, etc.) are ACF and WordPress API wrappers.Look elsewhere when:
@props, and view composers, not WordPress shims.theme.json cover most of what these directives do, and ACF Blocks has its own rendering path.For executives: This is a small, free, MIT-licensed open-source utility that removes custom code from our WordPress theme builds. It is mature — the current release, v2.0.7, is a bug-fix-only patch that corrects how image options are resolved when values are dynamic or empty, plus a documentation typo. No new API, no deprecations, no breaking changes, no migration work. Net effect: lower maintenance surface, faster theme delivery, negligible supply-chain risk.
For engineering: Directives are declarative sugar over ACF and WordPress template functions, so the upgrade is a drop-in composer update — no code changes required. The @image fix is the one to validate: any template passing variables, function calls, or empty strings into @image options was previously producing incorrect output and will now behave as expected. Add a smoke test on image-heavy templates (hero, cards, galleries) and confirm output markup and srcset are unchanged where options were already literal strings. Pin to ^2.0 and let patch releases flow; review minor bumps for ACF/Sage compatibility.
How can I help you explore Laravel packages today?