Releases: mamedul/wp-hook
2025.9.14
[v2025.9.14] - 2025-09-14
Added
-
Initial Release: First public version of
wp-hook. -
Full WordPress Hook API Parity: Implemented the complete WordPress hooks system for Node.js.
-
Core Architecture:
-
Hook.jsclass to manage individual hooks. -
Wp_Hookclass to orchestrate all actions and filters. -
A default singleton instance is exported for ease of use, and the
Wp_Hookclass is exported for creating isolated instances.
-
-
Core API Methods:
-
add,removefor generic hook management. -
Action Functions:
add_action,remove_action,do_action,do_action_ref_array,remove_all_actions. -
Filter Functions:
add_filter,remove_filter,apply_filters,apply_filters_ref_array,remove_all_filters. -
Inspection Functions:
has_action,has_filter,did_action,current_action,current_filter,doing_action,doing_filter.
-
-
Features: Support for callback priorities and defining the number of accepted arguments.
-
Project Files:
-
Comprehensive
README.mdfor documentation. -
package.jsonfor NPM distribution. -
A full test suite (
test.js) ensuring all functions work as expected.
-
- Browser Compatibility: Implemented a Rollup build process to generate UMD bundles, allowing the library to be used directly in browsers.
- Production Builds: Added a minified version (
.min.js) for optimal performance in production environments. - Build Scripts: Included
npm run buildfor a standard development build andnpm run build:minifyfor a minified production build.