Release 0.20.13
Added a slot to partial and component templates in the view generator.
View full changelog
Changed
- View generator: add slot to partial and component templates
@slot_start and @slot_end directives, as well as slots with @view_start and @view_end. - The view generator was updated to include required PHP version in main plugin file. - Other updates included bumping PHP version to 8.2 in multiple YAML files, updating GitHub Actions in plugin generator, increasing minimum PHP version to 8.2, and setting default PHP version to 8.2.Added a slot to partial and component templates in the view generator.
Added $_slot to elements-partials-text and elements-partials-title
elements-partials-text: added $_slotelements-partials-title: added $_slotUpdated views to use $_slot for color and background color elements
$_slot (elements-partials-color, elements-components-color, elements-components-background-color)Replaced $content property with $_slot in elements-partials-button
elements-partials-button: replaced $content property with $_slotRemoved two views and updated two others to use $_slot instead of $content.
elements-partials-background-startelements-partials-background-endelements-partials-background to use $_slot and remove $content propertyelements-components-background-image to use $_slot and remove $content propertyAdded support for custom slots with new directives @slot_start and @slot_end, as well as slots with @view_start and @view_end.
@view_start and @view_end@slot_start and @slot_end$_view_start and $_view_end (print slot using $_slot)$_slot helper to ensure the variable always exists$_slot_start and $_slot_end (this allows to insert any HTML/PHP into a variable inside a view)release-plugin.yml, release-theme.yml, test-wordpress-root-lightyear.yml, and test-wordpress.ymlPlugin generator now includes required PHP version in main plugin file
Added two new JavaScript utilities: domReady and post for making POST AJAX requests.
window._airfleet.elements.core.domReady JS utility (run callback when DOM is ready)window._airfleet.elements.core.post JS utility (make a POST AJAX request)Updated the view generator's JavaScript script to use a utility function from Airfleet Elements - Core.
Set default PHP version to 8.2 and update composer/installers to 2.2.0