airfleet/airfleet-views-plugin

Project releases

airfleet-views-plugin

Release 2.2.0

Upgraded block API to version 3 and improved style enqueuing for block editor iframes.

GitHub
View full changelog

Added

  • Added UpgradeAirfleetBlockVersion feature to dynamically upgrade the block API version to 3 for all Airfleet blocks
  • Added ACF toggle (upgrade_block_api_version) and filter (airfleet/views/blocks/upgrade_api_version) to control Block API version 3 upgrade per-site

Changed

  • Changed EnqueueFactory::enqueue_editor() to always use inline styles for block editor iframe compatibility
  • Changed EnqueueFactory to route admin screen styles through enqueue_block_assets when in the block editor, so *.admin.entry.scss view styles reach the iframe

Added (new files)

  • Added BlockEditorEnqueueStyle class to enqueue styles via enqueue_block_assets for block editor iframe support
airfleet-views-plugin

Release 2.1.1

Fixed a fatal error caused by undefined variables for components without field groups

GitHub
View full changelog

Fixed

  • Fixed fatal error Uncaught TypeError: array_merge(): Argument #1 must be of type array, string given that resulted from undefined variables for components without field groups
airfleet-views-plugin

Release 2.1.0

Added filters for script dependencies and attributes, support for data-src attributes in source scripts, and view context data attributes.

GitHub
View full changelog

Added

  • Added filter airfleet/views/dependencies/{view_slug}/{screen}/{type} to declare script dependencies for views
  • Added filter airfleet/views/enqueue/scripts/inline/attributes to modify inline script attributes (type and other attributes). Receives params: $attributes (array with 'type' and 'attributes' keys), $handle, $source
  • Added filter airfleet/views/enqueue/scripts/source/attributes to modify source script attributes (type and other attributes). Receives params: $attributes (array with 'type' and 'attributes' keys), $handle, $source, $version
  • Added support for data-*-src attributes (e.g., data-airfleet-src) in source scripts. When a script has a data-*-src attribute, the src attribute is not output as the script source is handled via the data attribute
  • Added view slug as data-af-view attribute to view context
  • Added dependency information to inline scripts via data-dependencies attribute
airfleet-views-plugin

Release 2.0.0

Requires PHP 8.2 and the Airfleet Framework plugin.

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-views-plugin

Release 1.17.1

Bumped WordPress Framework version to 1.19.1 and fixed field group loading issue

GitHub
View full changelog

Changed

  • Bump composer dependency airfleet/wordpress-framework to ^1.19.1

Fixed

  • Fixed issue with not loading all field groups
airfleet-views-plugin

Release 1.17.0

Changed ACF Local JSON Cache setting and bumped WordPress Framework dependency

GitHub
View full changelog

Changed

  • Changed setting "ACF Local JSON Cache" to disabled by default
  • Bump composer dependency airfleet/wordpress-framework to ^1.19.0
airfleet-views-plugin

Release 1.16.2

Fixed errors related to incorrect class loading order.

GitHub
View full changelog

Fixed

  • Fixed errors related to Setup/Controller classes extending from other Setup/Controllers that were loaded in the wrong order.
airfleet-views-plugin

Release 1.16.1

Fixed error updating blocks with invalid JSON response.

GitHub
View full changelog

Fixed

  • Fixed error message "Updating failed. The response is not a valid JSON response." that appeared when editing blocks and benchmarking option was enabled.
airfleet-views-plugin

Release 1.16.0

Added object caching to various parts of the plugin for performance improvement and introduced a benchmarking feature with cache stats and options control.

GitHub
View full changelog

Added

  • Added object caching to views registration service (the process of finding all views and related resources and registering them)
  • Added object caching to the registration of assets with WordPress (ACF blocks, block patterns, custom page templates, template hierarchy)
  • Added object caching to the setup process of enqueueing resources
  • Added object caching for inline scripts and styles
  • Added object caching for avoiding undefined variables
  • Added options to control cache: clear cache, enable/disable general cache, enqueue file contents strategy, ACF Local JSON cache, ACF Add-ons cache, cache expiration, enable/disable directory checks cache, directory checks expiration.
  • Added basic cache stats to the options page
  • Added filter airfleet/views/enqueue/contents/strategy to set the caching strategy for file contents used in inline enqueue. Valid values are: discovery (cache on discovery), demand (cache on demand), static (don't cache).
  • Added a benchmarking feature. When enabled, an HTML comment will be printed at the end of the page with the amount of time in milliseconds it took to run certain features. The comment is only displayed for authenticated users.

Changed

  • Instantiation of Setup classes now only happens after views registration is done, right before initialization of the setup classes (this allows Setup classes to inherit from other Setup classes that only registered after)
  • Added lightweight static caching in key places (setup actions, enqueue screen detection, views rendering, enqueue discovery, inline enqueue, enqueue registry)
  • Bump airfleet/wordpress-framework to 1.18.3
  • Debugger: Now only runs in admin context
  • Debugger: Consolidated error notices for undefined classes
  • Debugger: Refactored code for improved performance
  • Internal: Refactored registration service to separate between discovery phase (costly, can be cached) from setup phase
  • Options: Moved Versions tab lower in the Views settings
  • Updated filter "airfleet/views/enqueue/{$view_slug}/{$screen}/{$type}" - added params $view_slug, $screen, $type
airfleet-views-plugin

Release 1.15.0

Updated default enqueue options for Views with new default values and postfix.

GitHub
View full changelog

Changed

  • Changed default values for Views default enqueue options and updated Values for that option to with postfix - (Default)
airfleet-views-plugin

Release 1.14.0

Added a filter to control view rendering based on access restrictions

GitHub
View full changelog

Added

  • Added filter airfleet/views/can_render to control view rendering based on access restrictions (e.g., for blocks hidden from anonymous users)
airfleet-views-plugin

Release 1.13.1

Fixed a script enqueue issue with wp_head firing too early.

GitHub
View full changelog

Fixed

  • Fixed when head_inline enqueue scripts were hanging in the air due to wp_head already firing before they were enqueued.
airfleet-views-plugin

Release 1.13.0

Added several new helpers for contextual view information, including $_history, $_view_history, $_parents, and $_parent.

GitHub
View full changelog

Added

  • Added $_history helper (an array that provides contextual information about the views history rendered so far)
  • Added $_view_history helper (an array that provides contextual information about the current view being rendered and its parents)
  • Added $_parents helper (an array that provides contextual information about the parents of the current view being rendered)
  • Added $_parent helper (an array that provides contextual information about the immediate parent of the current view being rendered)

Changed

  • Updated views history to include each views data and child index (enriches $history param for filters airfleet/views/context and airfleet/views/enqueue/{$slug}/method)
airfleet-views-plugin

Release 1.12.0

Added an option to prevent fatal errors in the admin backend due to missing Controller and Setup classes.

GitHub
View full changelog

Added

  • Added an option (enabled by default) to prevent missing Controller and Setup classes from causing a fatal error in the admin backend. When the option is enabled, an admin notice will be displayed for each undefined class with information where it is called
airfleet-views-plugin

Release 1.11.0

Bumped airfleet/wordpress-framework to version 1.15.0

GitHub
View full changelog

Changed

  • Bump airfleet/wordpress-framework to 1.15.0
airfleet-views-plugin

Release 1.10.0

Added a new filter to customize data attributes for critical view scripts

GitHub
View full changelog

Added

  • Added filter airfleet/views/enqueue/scripts/critical/inline/data-attributes to customize data attributes for critical view scripts
airfleet-views-plugin

Release 1.9.2

Fixed several issues with asset and script loading.

GitHub
View full changelog

Fixed

  • Fixed issue with Head/Footer Inline enqueue methods not always firing.
  • Fixed assets paths in inline styles enqueue.
  • Fixed JS error for scripts loaded inline after/before (e.g. && being escaped to &&).
airfleet-views-plugin

Release 1.9.1

Fixed frontend assets enqueue issue and bumped WordPress framework version

GitHub
View full changelog

Fixed

  • Fixed frontend assets being enqueued in editor sometimes
  • Bump airfleet/wordpress-framework to 1.11.1
airfleet-views-plugin

Release 1.9.0

Bumped WordPress framework to version 1.11.0 for performance improvements and string helpers.

GitHub
View full changelog

Changed

  • Bump airfleet/wordpress-framework to 1.11.0 (performance improvements and string helpers)
  • Small performance improvements related to view registration string conversion and avoid undefined variable feature
airfleet-views-plugin

Release 1.8.1

Fixed critical assets enqueue issue in editor

GitHub
View full changelog

Fixed

  • Fixed frontend/critical assets being enqueued in editor and editor assets not being enqueued when block is first added on a page
airfleet-views-plugin

Release 1.8.0

Added view versioning support, including new filters and option messages.

GitHub
View full changelog

Added

  • Added view versioning support (create sub-folders within a view folder for each version, e.g. "v1", "v2", "v3")
  • Added filter airfleet/views/version/{$slug} - set view version to load (e.g. "default", "v1", "v2", "v3")
  • Added filter airfleet/views/versions/{$slug} - all available versions for a specific view
  • Added filter airfleet/views/versions - all views and related versions
  • Added message in options with available versions for views that have multiple versions
airfleet-views-plugin

Release 1.7.0

Fixed issue with saving custom groups in the Block/Component tab.

GitHub
View full changelog

Fixed

  • Fixed Block/Component tab custom groups not saved to view folder
airfleet-views-plugin

Release 1.5.2

Added new options and filters for enqueuing styles and scripts in views

GitHub
View full changelog

Added

  • Added enqueue styles options: Head (default), Head Async, Head Inline, Head Preload, View Async, View Inline, Footer, Footer Inline
  • Added enqueue scripts options: Footer (default), Footer (Async), Footer (Inline), Head, Head Defer, Head Inline, View Async After, View Defer After, View Inline After, View Inline Before
  • Added enqueue styles options to force a different enqueue method for first blocks on a page
  • Added action airfleet/views/enqueue_after/{$slug} - trigger enqueue for a view after the view is rendered
  • Added 1st param to action airfleet/views/enqueue/{$slug} to indicate which enqueue method to use
  • Added 3rd param to action airfleet/views/context - rendering information for current view (array with keys: slug, index, parents)
  • Added 4th param to action airfleet/views/context - rendering history for all views
  • Added filter airfleet/views/enqueue/{$slug}/method - filter enqueue method for a view
airfleet-views-plugin

Release 1.5.1

Fixed incorrect empty value type for multi-value ACF fields

GitHub
View full changelog

Fixed

  • Set correct empty value type for undefined ACF fields that are set to have multiple values (e.g. select with multiple choices)
airfleet-views-plugin

Release 1.5.0

Automatically sets empty values for undefined block and component fields.

GitHub
View full changelog

Added

  • Automatically set empty values for block/component undefined fields to avoid undefined variable warnings
airfleet-views-plugin

Release 1.4.3

Fixed issues with block attributes and CSS classes in the editor.

GitHub
View full changelog

Fixed

  • Fixed block ID attribute not being set (native "Advanced > HTML Anchor" setting)
  • Fixed block CSS classes set in editor not being added (native "Advanced > Additional CSS Class(es)" & block styles settings)
airfleet-views-plugin

Release 1.4.2

Fixed issue with registering unrelated blocks without JSON metadata

GitHub
View full changelog

Fixed

  • Fixed unrelated blocks not getting registered when one of the blocks lacks JSON metadata file
airfleet-views-plugin

Release 1.4.1

Skip block pattern registration when enqueue only flag is set

GitHub
View full changelog

Fixed

  • Skip block patterns registration when enqueue_only flag is set
airfleet-views-plugin

Release 1.3.0

Four new API functions were added for rendering views: airfleet_view_start, airfleet_view_end, airfleet_view_to_string, and airfleet_views_to_string.

GitHub
View full changelog

Added

  • Added API Function airfleet_view_start: Starts an instance to initiate a render for a view
  • Added API Function airfleet_view_end: Ends the view render instance started by airfleet_view_start
  • Added API Function airfleet_view_to_string: Renders a single view into an HTML string and returns the result
  • Added API Function airfleet_views_to_string: Renders one or more views into an HTML string and returns the result
airfleet-views-plugin

Release 1.2.0

Blocks now have an id attribute set by the anchor value in the block editor

GitHub
View full changelog

Added

  • id attribute is now set for blocks based on the value of the anchor that the user sets in the block editor
airfleet-views-plugin

Release 1.1.0

ACF Local JSON files now use {slug}.acf-group.json filename format

GitHub
View full changelog

Changed

  • ACF Local JSON files for blocks, components, and custom templates are now saved with filename format {slug}.acf-group.json (other formats are still supported for loading/re-saving/deleting)
airfleet-views-plugin

Release 1.0.0

The block editor now only enqueues specific styles and scripts.

GitHub
View full changelog

Changed

  • BREAKING: the block editor now only enqueues no-suffix or .editor styles/scripts (previously, if you created .frontend or .critical they would also be enqueued for the block editor)
airfleet-views-plugin

Release 0.12.2

Fixed issue with null data passed to view render

GitHub
View full changelog

Fixed

  • Fixed issue when passing null data to view render
airfleet-views-plugin

Release 0.12.1

Fixed issue with empty view folders preventing other views from loading

GitHub
View full changelog

Fixed

  • Fixed empty view folders causing other views not to load
airfleet-views-plugin

Release 0.12.0

Added optional parameters to the airfleet/views/config filter

GitHub
View full changelog

Changed

  • airfleet/views/config filter: added an optional param enqueue (defaults to true) - whether to enqueue styles/scripts
  • airfleet/views/config filter: added an optional param enqueue_only (defaults to false, except for /dist folders where it defaults to true) - only enqueue styles/scripts and do nothing else
airfleet-views-plugin

Release 0.11.1

Fixed PHP template rendering for paths with multiple dots.

GitHub
View full changelog

Fixed

  • Fixed PHP template rendering when path contains more than one "."
airfleet-views-plugin

Release 0.11.0

Added optional sync_local_json param to airfleet/views/config filter and fixed syncing of ACF custom fields

GitHub
View full changelog

Changed

  • airfleet/views/config filter: added an optional param sync_local_json (defaults to true, except for /dist folders where it defaults to false)

Fixed

  • Fixed issue where ACF custom fields would not be synced properly if dist folder had higher priority than normal folder
airfleet-views-plugin

Release 0.10.0

Added support for slots in views with new helpers

GitHub
View full changelog

Added

  • Added support for slots using new helpers $_view_start and $_view_end (print slot using $_slot)
  • Added $_slot helper to ensure the variable always exists
  • Added support for named slots using new helpers $_slot_start and $_slot_end (this allows to insert any HTML/PHP into a variable inside a view)
airfleet-views-plugin

Release 0.9.0

Added view helper to render views as strings

GitHub
View full changelog

Added

  • Added view helper $_view_to_string: render one or more views to a string
airfleet-views-plugin

Release 0.8.2

Fixed ACF blocks setup error due to empty fields

GitHub
View full changelog

Fixed

  • Fixed ACF blocks setup error caused by empty fields
airfleet-views-plugin

Release 0.8.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-views-plugin

Release 0.8.0

Removed filter airfleet/views/context/{$slug} and updated function airfleet_views_render() and helper $_view().

GitHub
View full changelog

Removed

  • BREAKING: removed filter airfleet/views/context/{$slug} (use airfleet/views/context instead)

Changed

  • Updated function airfleet_views_render() and helper $_view() to support a variable number of data arrays (arrays are merged together)
airfleet-views-plugin

Release 0.7.0

Removed several helpers and added a new view helper.

GitHub
View full changelog

Removed

  • BREAKING: removed helper $_asset_url (migrated to Airfleet Elements - Core)
  • BREAKING: removed helper $_attrs (migrated to Airfleet Elements - Core)
  • BREAKING: removed helper $_data_attrs (migrated to Airfleet Elements - Core)
  • BREAKING: removed helper $_dump (migrated to Airfleet Elements - Core)
  • BREAKING: removed helper $_in_block_editor (migrated to Airfleet Elements - Core)
  • BREAKING: removed helper $_reusable_block (migrated to Airfleet Elements - Core)
  • BREAKING: removed helper $_val (migrated to Airfleet Elements - Core)
  • BREAKING: removed helper $class (migrated to Airfleet Elements - Core)

Added

  • Added view helper $_view: render a view
airfleet-views-plugin

Release 0.6.0

Removed Airfleet Views Block from ACF locations and moved the menu to Settings.

GitHub
View full changelog

Changed

  • BREAKING: removed ACF location "Airfleet Views Block" (migrated to ACF Add-ons plugin)
  • Changed menu location to appear under Settings
airfleet-views-plugin

Release 0.5.2

Added support for WP hierarchy templates and custom page templates as well as a new filter to modify proxy data.

GitHub
View full changelog

Changed

  • Added a proxy for WP hierarchy templates and custom page templates (necessary for other rendering engines like Blade)
  • Added filter 'airfleet/views/proxy' - filter proxy data
airfleet-views-plugin

Release 0.5.1

Fixed ACF JSON file saving issue for custom page templates

GitHub
View full changelog

Fixed

  • Fixed ACF JSON file not being saved to view folder for custom page templates
airfleet-views-plugin

Release 0.5.0

Added action 'airfleet/views/register' to run after each single view registration

GitHub
View full changelog

Added

  • Added action 'airfleet/views/register' - runs after each single view is registered
airfleet-views-plugin

Release 0.4.0

Added ACF blocks registration and related features, fixed enqueueing of frontend resources in block editor preview

GitHub
View full changelog

Added

  • Added ACF blocks registration
  • Added filter "airfleet/views/blocks/{$slug}/json" - get block.json path for specific block
  • Added a custom ACF location to target Views blocks
  • Added option for creating "Airfleet" block category
  • Added option for adding blocks to "Airfleet" block category by default
  • Added view helper $class: ensures $class variable is always set

Fixed

  • Fixed an issue where frontend resources would not be enqueued in block editor preview
airfleet-views-plugin

Release 0.3.0

Views can now have a prefix and various components and templates were added or registered.

GitHub
View full changelog

Added

  • Added components registration
  • Added custom page templates registration
  • Added WordPress hierarchy templates registration
  • Added view helper $_in_block_editor: check if inside the block editor
  • Added view helper $_reusable_block: render a reusable block
  • Added view helper $_asset_url: get the compiled URL to an asset
  • Added view helper $_attrs: render attributes for HTML element
  • Added view helper $_data_attrs: render data attributes for HTML element

Changed

  • Views can now have a prefix. Prefix can be passed in filter "airfleet/views/config"
airfleet-views-plugin

Release 0.2.0

Added enqueue functionality for views with new filters and actions.

GitHub
View full changelog

Added

  • Added enqueue functionality for views: create files view-name.{$screen}.{$extension} (e.g. view-name.admin.css) in the view folder (screens can be critical, frontend, admin, editor; extension can be css, js, entry.css, entry.js)
  • Added filter "airfleet/views/enqueue/{$view_slug}/{$screen}/{$type}" - filters the files for enqueue
  • Added filter "airfleet/views/enqueue/override/{$view_slug}/{$screen}/{$type}" - determines if parent enqueues will be overridden
  • Added action "airfleet/views/enqueue/{$slug}" - trigger enqueue for a view
airfleet-views-plugin

Release 0.1.0

Added functionality to register and render views, including setup, controllers, templates, and filters.

GitHub
View full changelog

Added

  • Added filter "airfleet/views/config" for registering views configurations from plugins/theme
  • Added Setup functionality for views: create class ViewNameSetup.php in view folder and extend from Airfleet\Plugins\Views\View\ViewSetup
  • Added Controller functionality for views: create class ViewNameController.php in view folder and extend from Airfleet\Plugins\Views\View\ViewController
  • Added Template functionality for views: create file view-name.php in view folder and render it how you want (context will be available as variables in the template)
  • Added function airfleet_views_render( string $slug, $data = [] ) to render a view
  • Added view helper $_ctrl to access view Controller
  • Added view helper $_dump( ...$vars ) to dump variable information
  • Added view helper $_val( $key, $default ) to get a data variable or return the default value
  • Added action "airfleet/views/setup" - runs after views are registered
  • Added action "airfleet/views/render/{$slug}" - trigger rendering for a specific view
  • Added action "airfleet/views/template/render" - trigger rendering using a specific template
  • Added filter "airfleet/views" - filters all the registered views
  • Added filter "airfleet/views/{$type}" - filters the registered views of a specific type (e.g. partials, components, blocks)
  • Added filter "airfleet/views/template/{$slug}" - filters the template path for a specific view
  • Added filter "airfleet/views/context" - filters the context for all views
  • Added filter "airfleet/views/context/{$slug}" - filters the context for a specific view
  • Added filter "airfleet/views/setup/{$slug}" - filters the setup objects for a specific view
  • Added filter "airfleet/views/controller/{$slug}" - filters the controller class name for a specific view