airfleet/airfleet-elements-core-plugin

Project releases

airfleet-elements-core-plugin

Release 2.2.1

Fixed fullscreen editor view by restricting the body class observer to the block editor iframe.

GitHub
View full changelog

Fixed

  • Fixed fullscreen editor view breaking due to mirror_body_class_to_iframe MutationObserver running on the main page. Observer now only runs inside the block editor iframe and watches document.body class changes instead of all DOM mutations on document.documentElement.
airfleet-elements-core-plugin

Release 2.2.0

Mirrors the afa-force-preview body class into the block editor iframe to enable CSS selectors.

GitHub
View full changelog

Added

  • Added afa-force-preview body class mirroring into the block editor iframe so force-preview CSS selectors work inside the iframe
airfleet-elements-core-plugin

Release 2.1.0

Added a class to the flexible partial.

GitHub
View full changelog

Added

  • Added afc-flexible__item-{nth} class to flexible partial.
airfleet-elements-core-plugin

Release 2.0.0

Increases PHP version requirement to 8.2 and adds Airfleet Framework plugin as a dependency.

GitHub
View full changelog

Changed

  • Breaking: Increased PHP version requirement to >=8.2
  • Breaking: Added new dependency - Airfleet Framework plugin - and removed scoped framework composer package
  • Added plugin dependencies in main plugin file (Requires Plugins metadata field)
  • Internal: Increased Node.js version requirement to >=24
  • Internal: Bump npm dependency @airfleet/wordpress-dev to ^4.0.0
  • Internal: Bump composer dependency airfleet/wordpress-dev to ^4.0.0
  • Internal: Switched package manager to Bun
  • Internal: Updated linters and development tools
  • Internal: Updated configuration for development tools
  • Internal: Moved configuration sections from package.json to dedicated config files
  • Internal: Updated browserslist configuration
  • Internal: Updated package.json scripts to use Airfleet CLI
  • Internal: Updated README.md to remove Getting Started and Documentation sections
  • Internal: Updated Plugin URI metadata field in main plugin file
  • Internal: Updated GitHub workflows
  • Internal: Added .airfleet-license and .airfleet-visible
airfleet-elements-core-plugin

Release 1.13.0

Forced block editor placeholder previews can now be enabled instead of rendering full views.

GitHub
View full changelog

Added

  • Added feature to force block editor placeholder previews instead of rendering full views. Views that are JS heavy should use preview placeholders. Feature can be disabled in the options
  • Added filter airfleet/elements/force_preview to enable/disabled forced previews
  • Added filter airfleet/elements/exclude_non_editor_scripts to set views that should exclude non-editor scripts when previews are forced (views that support forced previews should add their slug to this filter)
  • Added helper $_should_show_preview (determines if block editor preview should be shown based on block editor detection, forced preview mode, show preview data, and view empty status).
  • Added admin CSS body class afa-force-preview when forced previews are enabled
airfleet-elements-core-plugin

Release 1.12.0

Default enqueue method for global frontend styles and scripts is now 'Head (Inline)'

GitHub
View full changelog

Changed

  • Changed default option for the "Enqueue method for global frontend styles and script" and changed label for the options to point default option. "Head (Inline) - Default" and "Footer (Inline) - Default" set as default now.
airfleet-elements-core-plugin

Release 1.11.0

Bumped airfleet/wordpress-framework to 1.16.0, fixing a PHP error with certain block IDs.

GitHub
View full changelog

Changed

  • Bump airfleet/wordpress-framework to 1.16.0 (fixes issue where certain block IDs caused a PHP error due to strings be treated as callables)
airfleet-elements-core-plugin

Release 1.10.0

JS utilities are now available through global var _af

GitHub
View full changelog

Changed

  • JS utilities are now available through global var _af (e.g. _af.debounce) under the same names, with the exception of domReady (now named ready, i.e. _af.ready) and dispatchEvent (now named dispatch, i.e. _af.dispatch)
airfleet-elements-core-plugin

Release 1.9.0

Added Blade directive @render_post to render a specific post

GitHub
View full changelog

Added

  • Added Blade directive @render_post (render a specific post)
airfleet-elements-core-plugin

Release 1.8.0

Added several new helpers and blocks for rendering posts and collections.

GitHub
View full changelog

Added

  • Added helper $_as_flexible (takes a standard component's data and converts it to a structure equivalent to a flexible component)
  • Added helper $_render_post (render a specific post)
  • Added custom post type afe_collection (utility CPT to hold collections of items, e.g. accordion items, slides)
  • Added block elements-blocks-post (render any post)
  • Added block elements-blocks-collection (render a Collection post)
airfleet-elements-core-plugin

Release 1.7.0

Added a Cookiebot compatibility fix to the domReady utility

GitHub
View full changelog

Added

  • Added Cookiebot compatibility fix to domReady utility: implements polling fallback when Cookiebot is active to ensure callbacks execute even if DOMContentLoaded event is interfered with
airfleet-elements-core-plugin

Release 1.6.0

Added support for custom data attributes in inline critical scripts

GitHub
View full changelog

Changed

  • Added support for custom data attributes for inline critical scripts (through Airfleet Theme Support plugin options or through filter airfleet/framework/inline-script-registry/data-attributes)
  • Bump airfleet/wordpress-framework to 1.15.0
airfleet-elements-core-plugin

Release 1.5.1

Fixed asset paths for global inline styles enqueue methods

GitHub
View full changelog

Fixed

  • Fixed assets paths when using global inline styles enqueue methods
airfleet-elements-core-plugin

Release 1.5.0

Added helper functions for checking empty variables and elements.

GitHub
View full changelog

Added

  • Added helper $_empty (check if a variable is empty, with special handling for components, flexible components and type switches)
  • Added airfleet/elements/empty/$slug filter to determine if element is empty
  • Added function airfleet_is_element_empty
  • Added function airfleet_is_flexible_empty
  • Added function airfleet_is_type_switch_empty
airfleet-elements-core-plugin

Release 1.4.0

Added options to enqueue frontend styles and scripts globally.

GitHub
View full changelog

Added

  • Added enqueue options for global frontend styles: Default (Head), Head Async, Head Inline, Head Preload, Footer, Footer Inline
  • Added enqueue option for global frontend scripts: Default (Footer), Footer Async, Footer Inline, Head, Head Defer, Head Inline
airfleet-elements-core-plugin

Release 1.3.0

Added support for direct passthrough properties in flexible components

GitHub
View full changelog

Changed

  • $_flexible/@flexible/elements-partials-flexible-component: added support for direct passthrough properties (root properties apply to all children, e.g. [ 'class' => 'class-name' ])
airfleet-elements-core-plugin

Release 1.2.1

Fixed issue with promise not resolving for already loaded scripts

GitHub
View full changelog

Fixed

  • loadScript: Fixed promise not resolving for already loaded scripts
airfleet-elements-core-plugin

Release 1.2.0

Class attribute merging for flexible component passthrough properties

GitHub
View full changelog

Changed

  • $_flexible/@flexible/elements-partials-flexible-component: class attribute is now merged for all passthrough properties
airfleet-elements-core-plugin

Release 1.1.0

Added passthrough properties to flexible components

GitHub
View full changelog

Changed

  • $_flexible/@flexible/elements-partials-flexible-component: Added passthrough properties by wildcard (target children using slug wildcard, e.g. [ '*button*' => [ 'default_style' => 'x' ] ])
airfleet-elements-core-plugin

Release 1.0.0

Added options to customize ACF block settings and add ID fields.

GitHub
View full changelog

Added

  • Added option "Hide Advanced panel for ACF blocks" (hides native "Advanced" panel - replaced by new options)
  • Added option "Add ID field to all blocks" (replaces "HTML Anchor" option from native "Advanced" panel)
  • Added option "Add 'Additional CSS classes' field to all blocks" (replaces "Additional CSS Class(es)" option from native "Advanced" panel)
airfleet-elements-core-plugin

Release 0.10.1

Increased timeout workaround for editor domReady

GitHub
View full changelog

Fixed

  • Increased timeout workaround for editor domReady
airfleet-elements-core-plugin

Release 0.10.0

Added a helper function $_is_preview() for determining if the block editor is in preview mode.

GitHub
View full changelog

Added

  • Added helper $_is_preview() (returns true when previewing in block editor)

Fixed

  • Fixed helper $_in_block_editor() not triggering when new component was added on block; now alias to $_is_preview()
airfleet-elements-core-plugin

Release 0.9.0

Improved callback timing execution and fixed concurrent load requests issue

GitHub
View full changelog

Changed

  • domReady: now executes callbacks after a small delay when running in the admin (helps with block previews in editor due to racing condition of ACF loading data for blocks)
  • loadScript: improved callback timing execution for concurrent load requests (e.g. the onload callback for the second script will now execute in the correct timing instead of immediately; this fixes issues in other plugins, for example, loading multiple forms would fail to load properly)
  • Updated browserslist (might result in slight change in script output)
airfleet-elements-core-plugin

Release 0.8.1

Make components more tolerant of invalid data

GitHub
View full changelog

Changed

  • flexible/typeswitcher: Make components more tolerant for invalid data
airfleet-elements-core-plugin

Release 0.8.0

Added several new utility functions and editor scripts

GitHub
View full changelog

Added

  • Added debounce utility function /assets/frontend/scripts/utils/debounce.js
  • Added useInViewport utility function /assets/frontend/scripts/utils/useInViewport.js
  • Added editor/scripts/utils directories
  • Added editor.entry.js file
  • Added editorBlockRender utility function /assets/editor/scripts/utils/editorBlockRender.js
airfleet-elements-core-plugin

Release 0.7.0

Updated data attribute checks in plugin helpers

GitHub
View full changelog

Changed

  • Updated all helpers that checked for data_attrs variable in context to check for data instead
airfleet-elements-core-plugin

Release 0.6.0

Added two JavaScript utilities for dispatching events and loading scripts.

GitHub
View full changelog

Added

  • Added window._airfleet.elements.core.dispatchEvent JS utility (send a custom event)
  • Added window._airfleet.elements.core.loadScript JS utility (append a script to the DOM from a URL)
airfleet-elements-core-plugin

Release 0.5.0

Added a helper to merge multiple style strings into one.

GitHub
View full changelog

Added

  • Added helper $_styles (merges several style strings into one)
airfleet-elements-core-plugin

Release 0.4.0

Added two new JavaScript utilities: domReady and post for making POST AJAX requests.

GitHub
View full changelog

Added

  • Added window._airfleet.elements.core.domReady JS utility (run callback when DOM is ready)
  • Added window._airfleet.elements.core.post JS utility (make a POST AJAX request)
airfleet-elements-core-plugin

Release 0.3.1

Set composer vendor-scoped autoloader-suffix based on plugin name

GitHub
View full changelog

Changed

  • Set composer vendor-scoped autoloader-suffix based on plugin name
airfleet-elements-core-plugin

Release 0.3.0

Added helper functions and filters for merging attributes and filtering child elements.

GitHub
View full changelog

Added

  • Added helper $_merge_attrs (merges class/attributes/data-attributes from context onto given array)
  • Added filter airfleet/elements/flexible/child/slug (filter slug for rendering child)
  • Added filter airfleet/elements/flexible/child/data (filter data for rendering child)

Changed

  • Changed priority for helpers, so they run later and have access to more context
airfleet-elements-core-plugin

Release 0.2.0

Added optional 'passthrough' property in flexible components and type switch elements, allowing properties to be passed to child elements.

GitHub
View full changelog

Changed

  • elements-partials-flexible-component: added optional passthrough property (allows passing properties to child of flexible component, accepts all key which applies to all children, $slug keys which applies to children with matching view slugs, and index keys which applies to children based on their position)
  • Helper $_flexible: added second argument for passing passthrough properties
  • elements-partials-type-switch: added optional passthrough property (allows passing properties to children, accepts all key which applies to all children and $slug keys which applies to children with matching view slugs)
  • Helper $_typeswitch: added second argument for passing passthrough properties
airfleet-elements-core-plugin

Release 0.1.0

Added new views and helpers for flexible components, type-switches, and other functionality.

GitHub
View full changelog

Added

  • Added view elements-partials-flexible-component (renders a flexible component)
  • Added view elements-partials-type-switch (renders a type-switch)
  • Added helper $class, $attrs, $data_attrs (ensures these variables always exist)
  • Added helper $_flexible / Blade directive @flexible (shortcut to flexible component partial)
  • Added helper $_typeswitch / Blade directive @typeswitch (shortcut to type-switch partial)
  • Added helper $_classnames / Blade directive @classnames (conditionally join CSS class names)
  • Added helper $_all_attrs / Blade directive @all_attrs (renders class, attributes, and data attributes)
  • Added helper $_asset_url / Blade directive @asset_url (migrated from Airfleet Views)
  • Added helper $_attrs / Blade directive @attrs (migrated from Airfleet Views)
  • Added helper $_data_attrs / Blade directive @data_attrs (migrated from Airfleet Views)
  • Added helper $_dump / Blade directive @dump (migrated from Airfleet Views)
  • Added helper $_in_block_editor (migrated from Airfleet Views)
  • Added helper $_reusable_block / Blade directive @reusable_block (migrated from Airfleet Views)
  • Added helper $_val / Blade directive @val (migrated from Airfleet Views)