The latest round of updates brings with it plenty of convenience features and bug fixes along with some exciting foundational changes to the L&L code editing interface. Read on to find out what’s new.
The big picture
Here’s a highlight of the features we’re most excited about that have been released with version 3.3.0
- L&L code completion making its way into the editor
- L&L templates can be added as ACF fields
- Improved compatibility with Pods custom fields
- Formatting shortcuts are now built into the Field tag
- New format options for exporting your templates
L&L code completion making its way into the editor
We’ve teased a few upcoming foundational changes in previous version update posts, but we’re excited to share that the first of these has made its way into the public release. By heading into the new Settings menu, you’ll find an option to enable the new template editor based on the latest version of CodeMirror.
In practice, not much changes when this is enabled other than the template editor looking a little different. The real exciting change here is in what this new editor means for the future interface of L&L and Tangible Blocks. This update to CodeMirror 6 was one of the final steps that needed to be taken before we could begin building convenient interface elements on top of the editor. For now, this simply means tag completion, as shown in the screenshot below. However, this change allows us to begin building out dynamic syntax reference material and adding interface elements for snippet injection and other quality-of-life improvements that have been sitting in the design stage until now. Expect L&L to get prettier and more usable in the coming releases!
L&L templates can be added as ACF fields
Did you know that L&L adds an extra custom field option to the ACF interface? If you didn’t, that’s likely because it wasn’t documented before today! To avoid loading L&L assets in the admin unnecessarily, this custom field feature can now be optionally enabled through the Loops & Logic settings menu. Once enabled, a Tangible Template field type will appear in ACF, giving you yet another way to organize your templates.
Technically, this is a breaking change since the setting used to be enabled by default, but is now disabled by default. While this likely won’t affect anyone since the feature was undocumented, power users who might have uncovered and used this feature on their sites will want to reactivate it in the settings after updating to version 3.3.0.
Improved compatibility with Pods custom fields
Loops & Logic is built to work with just about any WordPress data, no matter how it’s created. While ACF is currently the only custom field plugin officially supported by L&L, it’s always been possible to work with most basic custom fields from other sources, like Pods or Meta Box.
One unique quirk highlighted by a forum user appeared to affect Pods fields added to taxonomy terms. The latest update adds support for these fields, continuing our mission of building the most stack-agnostic tool for working with custom fields and dynamic data.
Formatting shortcuts are now built into the Field tag
A previous release added a wealth of new options to the
Format tag to allow it to modify data in powerful ways. The latest release adds these same attributes to the
Field tag, allowing you to use
replace_pattern on fields while keeping your syntax concise.
New format options for exporting your templates
Building templates is great. Sharing them with others is even better! The latest release of L&L adds an additional file format for sharing templates: PNG. Now you might be asking yourself: “Isn’t PNG an image format?” Indeed it is! But it’s also much easier to manage and share when compared to L&L’s previous JSON exports. While JSON files are human-readable, many systems don’t support sharing this file type. Now, templates can be packaged using a browser-native gzip compressor, which is then encoded as a PNG image file.
Full changelog from version 3.3.0
Release Date: 2023-11-02
- ACF integration
- Flexible Content and Repeater field: Improve compatibility with PHP 8
- Template field
- Add support for editor inside repeater field
- Breaking change: Make feature optional and disabled by default to prevent ACF from loading field assets (JS & CSS) on every admin screen; Enable in the new settings page
- Admin settings page: Tangible -> Settings
- Features under development: New editor based on CodeMirror 6
- Optional features: ACF Template field
- Field tag: Add format shortcuts: join, replace, replace_pattern
- Format tag: Support capture groups for replace_pattern; When invalid regular expression is passed, emit a warning instead of throwing an error
- Gutenberg integration
- Improve compatibility with standalone Gutenberg plugin
- Remove dependency on lodash
- If tag: Pass attribute “matches_pattern” without rendering, to support regular expression with curly braces; Use syntax
<If check=".." matches_pattern="..">; Support dynamic tags in attribute “matches_pattern” without delimiters; Display warning instead of throwing error for invalid pattern syntax
- Add new template package format using browser-native gzip compressor and encoded as PNG image file; This could be useful for uploading and sharing on forums where JSON is not suitable
- Ensure JSON and SVG file types are allowed during import
- Inteface module: Build Select2 from full version instead of minimal to improve compatibility with other plugins like ACF and WooCommerce which bundle their own Select2 library
- Menu loop: Return empty list if menu not found
- Post loop: Add field “modified_author” and “modified_author_*”
- Taxonomy term loop: Support taxonomy fields created with PODS