/* CHANGELOG */

VERSION 1.2.1 - 22/10/26
* FIX - Attribute filters such as size now stay on a translated shop when empty options are hidden. Those options were removed even though the products on the page still have those attributes.
* FIX - Choosing a translated category or attribute now includes products that are still filed under the original language term.
* FIX - Pages with an Archive Loop open in the block editor again when Edit Flow is active. The editor was stopping with a critical error when the loop was sorted by a custom field or date.

VERSION 1.2.0 - 19/10/26
* NEW - Featured Image Ratio setting for the Blog Style and Blog Card loop templates. Choose a shape such as 16:9 or square, and every featured image is cropped to it so all cards line up.
* FIX - Archive Loop Offset now stays in place when you open another page of results. The skipped posts stay skipped, and the result count stays the same.
* FIX - Block styles now load fresh after each plugin update. Before this, browsers and caches could keep showing the old styles, such as the previous toggle icon, until they were cleared.
* FIX - Minimal List loop template now shows the author and date when Enable Author or Enable Date is turned on. The meta separator setting is used between items as well.
* FIX - Reset now clears ticked checkboxes, dropdown choices, and text in the filters, not only the results. Before this, the filters kept their old choices after Reset.
* FIX - Show More on a filter with a height limit now opens the full list of options.
* FIX - Show More and Show Less are hidden while a toggle filter is closed. They used to show below the closed filter heading.
* FIX - Archive Loop grid columns on desktop now follow the Columns setting. A 3 or 4 column grid was showing as one or two columns.
* FIX - The sort menu now matches the order the posts loaded in. Choosing a different sort no longer shows "Sorry, no posts" the first time.
* FIX - A custom toggle icon no longer sits on top of the default arrow, and it stays visible and switches when the filter is opened or closed.
* FIX - Filtering an Archive Loop that is limited to certain taxonomy terms now keeps showing only posts from those terms.
* FIX - Post titles, tags, stock status and ACF field sorting set on the Archive Loop now stay the same after filtering, sorting or loading more posts.
* FIX - Group headings in a grouped Archive Loop now span the full row, and the next post starts on a new row.
* FIX - List view now shows the image beside the content for the Blog and Product loop templates.
* FIX - WooCommerce product grids now keep the Columns setting on themes that set their own product widths.
* FIX - Same Height Cards now works when the whole card is set to link to the post.
* FIX - Grid lists no longer show bullet points or extra left spacing on some themes.
* FIX - Hidden or empty WooCommerce products no longer leave blank spaces in the grid.
* FIX - Dropdown filters now fill the full width with the text centred, and no longer show two arrows.
* FIX - Button-style radio and checkbox filters no longer show a stray icon inside the button.
* FIX - The Search button on Search Posts shows on the live page again. It was hidden even though it appeared in the Visual Builder.
* FIX - Filtering no longer causes a critical error when the results refresh without a filter selected. The list of results still loads.
* FIX - Filters now update the list in the same part of the page when there is more than one list. The other list was changing instead, and some filter choices were missing.
* FIX - The Image Background minimum and maximum height settings now only affect the Image Background template. A height left over from that template was cutting off the title and excerpt on other card templates.
* FIX - Link styles for links inside the post content in the Archive Loop now apply. They were being ignored.
* FIX - Filter tags shown above the results are all the same height. The last tag, or a single tag on its own, was taller than the others.
* FIX - Unticking an option in the filters and clicking Search now removes its filter tag above the results.
* FIX - The toggle icon chosen in Filter Posts settings shows on each filter heading again, and it switches when the filter is opened or closed.
* FIX - Filter tags above the results show an X again, so a chosen filter can be removed.
* FIX - Choosing a product attribute, such as colour, now shows the matching products when the price slider has not been moved. A product could disappear even though it had the attribute you picked.
* FIX - Filtering an archive keeps the categories and colours already set on that list, including ones that are left out. Choosing a filter was showing every post, and the result count did not match.
* FIX - Choosing a filter on page 2 of a list shows the matching posts again. That page was staying selected, so the shorter list came back empty.
* FIX - Shop filters now stay on the page when you view the shop in another language. They were showing for a moment and then disappearing on every language except the original one.
* FIX - Category filters on a translated shop now list subcategories when the parent category has no products of its own. Those lists were blank on every language except the original one.
* FIX - Filtering no longer stops with a critical error when the results request has no page number.
* FIX - A single filter tag above the results now has the same space below it as a row of tags. On some themes, such as Kadence, it sat right against the first row of posts.
* FIX - The Button Spacing and Button Border settings for filter tags in Filter Posts now apply. Changing them had no effect before.
* FIX - Clicking a Filter Posts Item in the editor now shows the block toolbar, so you can move it up or down without opening List View.

VERSION 1.1.2 - 09/10/26
* FIX - Archive Loop no longer tries to filter by a custom field when none is selected. That extra step could stop the page from loading.
* FIX - Archive Loop pagination no longer writes a notice when the loop has only one page.
* FIX - Include and Exclude in Loop Options now list categories, tags, and taxonomies when Post Type is Auto Detect.
* FIX - The arrow on a toggle filter now lines up with the middle of the heading.
* FIX - Choosing several options in a dropdown filter and then filtering no longer stops with an error. The results update again.
* FIX - Opening Sorting in Archive Loop settings no longer crashes the block when the editor data has not loaded yet.

VERSION 1.1.1 - 07/10/26
* FIX - Activating the plugin no longer causes a critical error that takes the site offline.
* FIX - ACF and custom field filters set to a dropdown no longer show a PHP warning and raw markup instead of the dropdown.
* FIX - With caching turned on, filter counts and available choices now update after you pick a filter, instead of staying as they were on first load.

VERSION 1.1.0 - 05/10/26
* NEW - Archive Loop Blog Cards design option and Blog Card loop template: article cards with a category badge on the image, then the title, excerpt, and date at the bottom of the card. It arrives with the whole card set to link to the post, which you can turn off like any other setting.
* MOD - Documentation now links to the Ajax Filter Blocks docs site.
* MOD - In-plugin docs search uses the ajax-filter-blocks search collection.
* FIX - Archive Loop now uses the Price (and other ACF) sort order set on the module, including descending price.
* FIX - The Enable caching toggle in Ajax Filter settings now stays on after saving.
* FIX - Checkboxes and radio buttons in filters show their tick or dot again when selected, instead of appearing as blank grey boxes.
* FIX - The Check Connection button in Caching and Performance now tests your Redis or Memcached server instead of showing "Failed! No route was found matching the URL and request method".
* FIX - Testing a cache connection to a server that cannot be reached now reports a failure quickly, instead of leaving the settings page waiting.
* FIX - The shop sorting dropdown now shows on the first page load of an Archive Loop set to Products, instead of only appearing after filtering or moving to another page.
* FIX - Range slider and date filters keep their full width when "Display checkbox/radio inline" is turned on, instead of being squashed into a narrow strip on desktop.
* FIX - Filter result caching with WordPress DB Cache now works after you turn it on, without extra site configuration.
* FIX - Reset now keeps the categories excluded on the loop itself, so posts you never wanted shown no longer appear after clearing the filters.
* FIX - Reset now clears the sort order as well as the filters, so results and the shop sorting dropdown go back to how the page first loaded.
* FIX - Filter options with no matching results now stay hidden on the first page load and after clicking All, on loops that are limited by a custom field (for example a page showing one collection).
* FIX - Tick box checkboxes and radios in filters show the box and selected tick again, instead of only the label.
* FIX - Selected filter choices stay visible when another filter gives them no matches, and removing their filter tag now clears them correctly.
* FIX - Removing a filter tag updates the results and the page address right away, instead of the removed choice being applied again from the address.
* FIX - Custom field filters set to "Select Drop Down" now open a list you can tick several options in, instead of showing a plain dropdown that only lets you pick one.
* FIX - Opening or sharing a filtered link now shows a single active filter tag with the proper category name, instead of adding a second tag showing the raw value, such as "bac-5" beside "BAC+5".
* FIX - Filter dropdowns no longer show "var" in front of the first option when that text starts with dashes, such as "-- Choisir un pays --".
* FIX - Category filters stay visible on a custom post type loop that is limited to one category. The choices were flashing on load and then disappearing, even though the loop still showed posts in those categories.
* FIX - Dropdown filters now drop choices that have no matching posts once you pick another filter. A location could stay in the list, and could still be selected, even when nothing matched it together with the category you had already chosen.
* FIX - Load More on a product loop no longer freezes the page while the next products are added.

VERSION 1.0.8 - 14/08/26
* FIX - Filter and Archive Loop blocks keep their layout and custom controls, but only use Divi-style buttons, dropdowns, and fields when Divi (or a Divi child theme) is active. Other themes keep their own form styling unless you change the block Design settings.
* FIX - Archive Loop Read More and Add to Cart icons stay a normal size on non-Divi themes, and Read More no longer shows an icon when Show Button Icon is turned off.
* FIX - Button border radius can be set above 10px.
* FIX - Archive Loop card border, padding, and shadow settings apply again on the blog layout.
* FIX - License Management is hidden unless Ajax Filter Blocks Pro is installed.

VERSION 1.0.7 - 14/08/26
* MOD - Corrected Free vs Pro wording so the free plugin only claims what it includes (custom meta, sidebar / top-bar, grid / masonry with standard pagination). Pro extras such as the ACF Fields picker, map / radius search, mobile filter toggle, Toggle / Slide appearances, Product Rating, Load More / infinite scroll, and list layouts are documented to match the Pro product page.

VERSION 1.0.6 - 13/08/26
* MOD - WordPress.org readme now links to Ajax Filter Blocks Pro for upgrades.
* MOD - Upgrade to PRO button in the block editor now opens the correct Pro product page.
* MOD - Admin submenu label now says Ajax Filter Blocks to match the plugin name.
* MOD - Help tooltips on the "?" icons in the block settings now open straight away instead of after a delay.
* MOD - Removed the Divi-only Custom Layout option from Archive Loop’s Loop Style setting.
* MOD - Minimal List now starts as a single-column layout, while Background Image starts without body content and exposes its content and excerpt controls.

VERSION 1.0.5
* MOD - WordPress.org package now uses a unique internal code prefix (wpenajfi) while keeping the public plugin name and slug.
* FIX - Layout and SVG markup is always sanitized before output (no raw SVG bypass).
* FIX - Loop shortcode REST responses sanitize the shortcode name and escape returned HTML.

VERSION 1.0.4
* FIX - Hardened public filter REST origin checks and sanitize taxonomy filter URL terms.
* FIX - Block render callbacks now return buffered markup instead of echoing it.
* MOD - Catalog Index and Auto suggest are provided by the separate Pro add-on and are not included in this free package (settings show a Pro notice only; no locked Pro implementation ships in the free zip).
* FIX - Free package settings hub loads again (pages script filename + REST namespace after packaging).
* MOD - Removed license activation and updater leftovers from the WordPress.org free package.
* MOD - Documented admin InstantSearch docs search under External services; clarified Pro indexing is a separate add-on.
* MOD - Updated Select2 to 4.1.0 stable and labeled Swiper 12.1.2 in the shipped asset.
* MOD - WordPress.org package build keeps version numbers in sync across the plugin file and readme, and uses the full plugin prefix for internal code names in the downloadable zip.
* MOD - Standalone blocks package now flags itself with `DIVI_AJAX_FILTER_STANDALONE_BLOCKS` instead of a short `BAF_` version constant; block script versions use `DIVI_AJAX_FILTER_VERSION`. If you have custom PHP that referenced the old `BAF_Archive_Loop_Block_Handler` class name, update it to `Divi_Ajax_Filter_Archive_Loop_Block_Handler`.
* MOD - WP Enhanced settings dashboard no longer installs or activates other plugins via REST; it links to the Add Plugins and Plugins screens instead, per WordPress.org guidelines.
* MOD - Updated plugin naming to WPEnhanced Ajax Filter Blocks and aligned the WordPress.org slug to wpenhanced-ajax-filter-blocks.
* MOD - Linked the public source repository and build steps in the readme for WordPress.org guideline 4.
* MOD - Clarified webpack output paths for developers using the public source repository.
* MOD - Documented as tested up to WordPress 7.0; requires WordPress 6.1 or newer.
* FIX - Archive and Filter blocks now strip markup from generated inline CSS and escape loop and map tooltip HTML on output for safer front-end rendering.
* FIX - Checkbox and radio filters with "Display inline" enabled now show options in a horizontal row in sidebar filters, not only in full-width filter bars.
* FIX - Inline radio and checkbox filter options in full-width filter bars now keep each label on one line on desktop, wrap cleanly on mobile without overflowing the filter bar, and no longer overlap when there are many options.
* MOD - Archive Loop: you can style the No Posts Found message from the Design tab (font, background, border, color, alignment, and text shadow).
* FIX - Improved WordPress.org compliance by hardening shared filter/load-more REST responses, permissions, and runtime script/style handling.
* NEW - Search filter has a Browser Autocomplete setting (on by default) so you can turn off unwanted previous-search suggestions from the browser.
* FIX - Include Tags on an Archive Loop now keeps a custom post type that uses the normal Tags list limited to those tags, on the first load and when you filter.

VERSION 1.0.0
* NEW - Initial release.
* NEW - Archive Loop block: display posts, custom post types, or products in a grid, list, or masonry layout with pagination and load more.
* NEW - Filter Posts block: add filters by taxonomy, custom fields (ACF), meta, and WooCommerce attributes; supports checkboxes, dropdowns, and multi-select.
* NEW - Filter Posts Item block: place inside Archive Loop to show each post or product with full layout control.
* NEW - AJAX filtering without page reload; URL parameters for shareable filtered links.
* NEW - Compatible with WooCommerce products, custom post types, and Advanced Custom Fields.
