A set of related helpers to kick-start WordPress development.
This package is auto-updated.
Last update: 2023-09-11 12:44:57 UTC
Contributors: Antonius Hegyes, Deep Web Solutions GmbH
Requires at least: 5.5
Tested up to: 5.9
Requires PHP: 7.4
Stable tag: 1.7.2
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
A set of helpers to kick-start WordPress development. This package is designed to contain small, helpful, static snippets that can be reused throughout different projects.
Documentation for this module and the rest of the DWS WP Framework can be found here.
The package is designed to be installed via Composer. It may work as a stand-alone but that is not officially supported.
The package's name is
If the package will be used outside a composer-based installation, e.g. inside a regular WP plugin, you should install
--ignore-platform-reqs option. If you don't do that, the bundled
DWS WordPress Framework - Bootstrapper package
will only be able to perform checks for the WordPress version because composer will throw an error in case of an incompatible PHP version.
Contributions both in the form of bug-reports and pull requests are more than welcome!
- Will you support earlier versions of WordPress and PHP?
Unfortunately not. PHP 7.3 is close to EOL (March 2021), and we consider 7.4 to provide a few features that are absolutely amazing. Moreover, WP 5.5 introduced a few new features that we really want to use as well, and we consider it to be one of the first versions of WordPress to have packed a more-or-less mature version of Gutenberg.
If you're using older versions of either one, you should really consider upgrading at least for security reasons.
- Is this bug-free?
Hopefully yes, probably not. If you found any problems, please raise an issue on Github!
- Removed the usage of deprecated FILTER_SANITIZE_STRING filter.
- Added new helper for converting between a filesystem path and a website URL.
- Fixed: bug in Misc::wp_parse_args_recursive when the default is an array but the passed on argument isn't.
- Small overall performance tweaks.
- Updated hooks to conform to new format in the rest of the framework.
- Improved upon the
Request::is_typemethod inline with WC deprecations in 6.0.
- Introduced a new helper class for working with constants.
- Enhanced the
- Enhanced the
AssetsHelpersTraitno longer automatically includes the
- Inverted the parameter order of
- Better handling of error for the
- Added more automated testing.
- Added methods
- Better filesystem detection for assets helpers.
Strings::maybe_castreturns default if string is null.
- Added new polyfill
1.4.6, 1.5.0, 1.5.1, 1.5.2 , 1.5.3(October 27th, October 28th, October 29th, November 1st, November 3rd, 2021)
Users::has_rolesdefault logical operator is now 'or'.
Users::has_capabilitiesnow also accept a string as a first parameter.
Strings::maybe_castwrong placement of parenthesis.
Files::has_extensionnow uses the newly-introduced
- Make use of
wp_normalize_pathfor better support of cross-OS website migrations.
- RequestTypesEnum was removed. Use strings.
- Moved the WordPress subnamespace one level up.
- Asset handle and hook tag extras can now be a single string as well.
- Enhanced the asset helpers trait.
- Special handling for trying to cast a null to boolean. Now it will return the default instead of false.
- Made coding rules exceptions more specific.
- Improved REST API detection to remove false positives on AJAX requests.
- Added new helpful string helpers.
- Fixed the default of
- Changed the joining separator for hooks tags.
- New validation & sanitization API.
- Most old validation API has been renamed to casting.
- Added array validation.
- Replaced all references to
- Fixed some bugs in the
- Overall performance tweaks.
- Added more security helpers.
- Tweaked validation helpers.
- Added defaults for the $default argument for validation helpers.
- Tweaked data type resolvers to handle more cases.
- Added string validation helpers.
- Added new data type helpers for resolving a value from a potential callable.
- Migrated from Travis CI to Github Actions.
- Documentation updates.
- Added new object helpers for working with trait inheritance.
- Helper Objects::class_uses_deep_list are now guaranteed to return the traits in declaration order top-bottom.
- The helper Objects::class_uses_deep now returns a tree-like structure of the inheritance pattern.
- Updated development tools.
- Updated version constant.
- Improved safe-string formation.
- Added more string transformation helpers.
- Created an export of all used WP functions and classes.
- Tweaked development tools configurations.
- Added some missing ABSPATH guards and backslashes to disambiguate global namespace references.
- Enhanced an arrays helper (edge-case).
- Tweaked the
- First official release.