All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Changed pagination query_string filter to filter_var( $_SERVER['QUERY_STRING'], FILTER_SANITIZE_URL );. htmlspecialchars() caused problems with & characters and pagination partials.
- PHP 8.1 fix: Dust PHP syntax errors.
- PHP 8.1 fix: FILTER_SANITIZE_STRING fixes.
- A compatibility issue with PHP 8.1 and return types in dust/Evaluate/Bodies
- A compatibility issue with PHP 8.1 on
get_templates()
- Function
is_dustpress_ajax
from private to public.
- Removed deprecated
implements \Serializable
(php 8.1) from dust/Dust.php.
- Rendering bug in
user-activate.dust
.
- Escaping filters:
wp_kses_post
(|kses
),esc_attr
(|attr
),esc_html
(|html
) andesc_url
(|url
) filters added. - Ability to include custom filters via
dustpress/filters
filter.
- A bug where model termination would not work immediately if
terminate()
was called in constructor. - Template usage for CPT posts. Also allow page templates to use any name, as intended in WP.
- Current menu item check on archive pages.
- Pagination parameter page_count didn't always return the right value.
- Pagination parameters
page
andpage_count
. These can be used inside pagination.dust
- Archive pages for custom taxonomies when filtering with another taxonomy.
- A variable typo
- The UserActivateExtend class for allowing the functionality to be extended by the theme.
- PHP 7.4 notice when using @menu helper with empty or non-assigned menu.
- Search template to precede home template to fix hierarchy problem with Polylang searching.
no_form
parameter to@password
helper to be used when there's more than one instance of the helper at a page.
- DustPress.js calls returning JSON now return clear error messages from JSON encoding problems.
- DustPress will now measure it's own performance.
- Highlight color for performance alerts.
- Decreased DustPress-debugger performance alert from 0.1s to 0.02s.
- Possible fatal error caused by measure_hooks_performance.
- Ability to include custom data and filter the data of the pagination helper.
- Ability to disable encoding @s helper strings to HTML entities.
- The s helper runs its output through htmlentities function to encode quotes as HTML entities.
- Performance problems created by the performance measuring feature.
- Fix data handling in DustPress.js GET requests.
- A bug within the Helper base class that caused the page to crash in some situations.
- A lot of cleaning up of the code base.
- Moved saving template paths to the DustPHP instance earlier for compatibility reasons.
- A bug where
$GLOBALS['pagenow']
is empty.
- Remove the Dust dependency when rendering the data with another render function.
- More details for hook measurements.
- Added $main for dustpress/data/after_render filter.
- Automatic performance measuring for hooks.
- Automatic performance measuring.
- Added network support for the image helper
- A filter for image helper
$image_data
.
- A bug in the menu helper that caused fatal errors when the menu did not exist.
- Small fix to DustPHP for PHP 7.4 compatibility.
- A bug that prevented DustPress Debugger for working properly with AJAX calls.
- Debugging data from DustPress.js calls added to DustPress Debugger view as well.
- Default name for the debugging data block to "Debug" instead of "Helper data".
- Fixed the ability to run multiple methods with a single DustPress.js AJAX requests.
- A bug in the menu helper that caused fatal errors when the menu was empty.
- The model's terminating (
$this->terminate();
) feature which was broken because of the forced 404 feature.
- Added user email to the data for the partial in UserActivate model.
- Fixed the menu helper partial, which printed out an empty ul element when the requested menu doesn't exist.
- Fixed a bug in the pagination helper first page handling.
- Fixed a bug in user-active.php caused by a change in WP core.
- A bug where overridden methods in extended models would get run twice.
- Error handlers now send HTTP status code 500 in error situations.
- A bug in how class names with multiple word spaces should be formed.
- A bug in the AJAX single method running function.
- Optimized the loading of Dust partials so that the file matching is done only once per file.
- Fixed the inaccurate matching for WordPress feed urls in the core autoloader checking.
- Another minor bug regarding the custom route rendering type setting.
- An error where not giving a rendering type for custom routes would cause a notice.
- The ability to modify the output format of a custom route by giving it a third parameter to for example use custom routes as JSON endpoints.
- Fixed case in menu helper build_menu method when $item->classes is not an array (e.g. certain cases in Customizer).
- A minor bug caused by the last update.
- Pagination helper fixed $page_count to return int not float. This caused failure on current page active state in some cases.
- A bug with the menu helper and WordPress Customizer.
- A bug that caused a notice when a template was rendered manually with empty data block.
- Object caching for the menu helper.
- A function
get_custom_route()
that returns matched custom route and the template it points to.
- Added a version check for the user activation feature because WordPress 5.0 breaks the backwards compatibility of the customization.
- Rendered HTML is not cached by default anymore as it may cause problems with object cache drop-ins.
- Only show image helper error messages if WP_DEBUG is set to true
- Cache DustPHP template file paths during runtime to prevent multiple recursive directory searches for same template requests.
- Make the menuhelper show the correct current item even on category or tag archives.
- Query::get_post() and Query::get_acf_post() methods to function properly without global post object existence.
- A bug in the Query class that caused a notice in certain situations.
- A filter to the output HTML of the Image helper.
DustPress\Query::get_acf_post()
method returns null if no post is found with the given id. Fixes #87.DustPress\Query::get_acf_post()
will not throw an error if ACF is not active.
- A bug that broke some of the recursive functionality in the Query class.
- A minor bug in the previous release.
- A bug where
get_post()
andget_acf_post()
would not work with proper IDs if used multiple times in a pageload.
- Fixed 'dustpress/router' filter for WordPress preview functionality.
- Removed unnecessary
$id
parameter fromget_post_meta()
. - Changed functions
get_post()
andget_acf_post()
to use global post if desired post id same as global post.
- Added a parameter to enable last update's changes as otherwise they would break backwards-compability.
- Some optimizations for DustPress ajax calls to make them faster and less error-prone.
- Core files do not override theme files anymore.
- A bug where core partials where unusable in some cases.
- A bug which prevented partials in theme from overriding core partials.
- A possibility to give Comparison helpers
type
parameter to use it with booleans as is the case with the original Dust.js.
- A bug where PHP warnings would occur when trying to call custom AJAX route that does not exist. Enhanced error messages as well.
- Template file locations are now searched only once and stored in cache to improve performance.
- Moved add_rewrite_tag calls to init hook.
- Ability to register custom routes.
- The Pagination helper now adds its data into the debugger.
- Code style fixes for the Pagination helper.
- Menu location to the menu helper data.
- Filters for menu object and menu items by the menu location.
- Documentation for Model class.
- A
set_args()
method for Model to make it possible to set arguments for an already instantiated model dynamically.
- A bug where renaming a model to a name it already had would throw an error.
- A bug where sending an array as a JSON POST payload to a DustPress site would cause an error.
- By giving the AJAX request a
data
parameter, it now returns the resulting data with the rendered partial. DustPress.js 2.1.0 is required for the front-end side.
- The
get_post
andget_posts
methods in theQuery
class now get the keyimage_id
containing the the featured image id if it is found.
- The
Pagination
helper allows changing the amount of pages displayed with the newneighbours
parameter. - Corrected documentation for
Query
classes recursive post querying functionality.
- Fixed a Notice from
is_cacheable_function
method when$ttl
is not set in some model
- Changed the default functionality for the render cacheing to be true
- Fixed not properly recognizing tidy & render arguments on older DustPress.js calls
- Model and partial containing the basic functionality of the default wp-activate.php file.
- Modifiied core so that when wp-activate.php is loaded the execution is stopped and DustPress creates its own instance.
- Optimized file loading routines to reduce loading times
- Support for new DustPress.js version