-
Notifications
You must be signed in to change notification settings - Fork 29
Add the WordPress hook library from 21170-core #13
Add the WordPress hook library from 21170-core #13
Commits on Jul 18, 2017
-
Adam Silverstein committed
Jul 18, 2017 Configuration menu - View commit details
-
Copy full SHA for 6bca9da - Browse repository at this point
Copy the full SHA 6bca9daView commit details
Commits on Jul 19, 2017
-
updates from ticket, flesh out removeAll, cleanup
Adam Silverstein committedJul 19, 2017 Configuration menu - View commit details
-
Copy full SHA for 85c73be - Browse repository at this point
Copy the full SHA 85c73beView commit details -
Adam Silverstein committed
Jul 19, 2017 Configuration menu - View commit details
-
Copy full SHA for dc71cd1 - Browse repository at this point
Copy the full SHA dc71cd1View commit details -
Adam Silverstein committed
Jul 19, 2017 Configuration menu - View commit details
-
Copy full SHA for 4013c9a - Browse repository at this point
Copy the full SHA 4013c9aView commit details -
Adam Silverstein committed
Jul 19, 2017 Configuration menu - View commit details
-
Copy full SHA for ff65810 - Browse repository at this point
Copy the full SHA ff65810View commit details -
clean up imports for (empty) tests file
Adam Silverstein committedJul 19, 2017 Configuration menu - View commit details
-
Copy full SHA for be62409 - Browse repository at this point
Copy the full SHA be62409View commit details
Commits on Jul 20, 2017
-
bring over object approach from core instead of passing around string
Adam Silverstein committedJul 20, 2017 Configuration menu - View commit details
-
Copy full SHA for 45d70c3 - Browse repository at this point
Copy the full SHA 45d70c3View commit details -
Adam Silverstein committed
Jul 20, 2017 Configuration menu - View commit details
-
Copy full SHA for 632c98a - Browse repository at this point
Copy the full SHA 632c98aView commit details -
Adam Silverstein committed
Jul 20, 2017 Configuration menu - View commit details
-
Copy full SHA for 77c9906 - Browse repository at this point
Copy the full SHA 77c9906View commit details -
Adam Silverstein committed
Jul 20, 2017 Configuration menu - View commit details
-
Copy full SHA for b4b713d - Browse repository at this point
Copy the full SHA b4b713dView commit details -
Break out code into one file per funciton
Adam Silverstein committedJul 20, 2017 Configuration menu - View commit details
-
Copy full SHA for 9d24e77 - Browse repository at this point
Copy the full SHA 9d24e77View commit details -
Centralize all run logic into
createRunHook
Also fixes a bug that `doingAction` would remain true after its action was completed. Effectively it would always be true.
Configuration menu - View commit details
-
Copy full SHA for 57f6038 - Browse repository at this point
Copy the full SHA 57f6038View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1901b43 - Browse repository at this point
Copy the full SHA 1901b43View commit details -
Merge branch 'add-wp-hooks' of github.com:adamsilverstein/packages in…
…to add-wp-hooks
Adam Silverstein committedJul 20, 2017 Configuration menu - View commit details
-
Copy full SHA for b05f488 - Browse repository at this point
Copy the full SHA b05f488View commit details -
Configuration menu - View commit details
-
Copy full SHA for f6c2b45 - Browse repository at this point
Copy the full SHA f6c2b45View commit details -
Configuration menu - View commit details
-
Copy full SHA for f50aadb - Browse repository at this point
Copy the full SHA f50aadbView commit details -
Configuration menu - View commit details
-
Copy full SHA for bee29d7 - Browse repository at this point
Copy the full SHA bee29d7View commit details -
Merge branch 'add-wp-hooks' of github.com:adamsilverstein/packages in…
…to add-wp-hooks
Adam Silverstein committedJul 20, 2017 Configuration menu - View commit details
-
Copy full SHA for f8e129d - Browse repository at this point
Copy the full SHA f8e129dView commit details -
Several fixes to hook removal behavior
- Calling `removeAction` and `removeFilter` without a callback should not remove all hooks. This operation should be explicitly requested. - Calling `removeAllActions` and `removeAllFilters` should not reset `didAction` and `didFilter` counts. Also correctly reset state (clear all hooks and all hook call counts) before each test.
Configuration menu - View commit details
-
Copy full SHA for b02296c - Browse repository at this point
Copy the full SHA b02296cView commit details -
Configuration menu - View commit details
-
Copy full SHA for aeca7df - Browse repository at this point
Copy the full SHA aeca7dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 678f790 - Browse repository at this point
Copy the full SHA 678f790View commit details -
Naming and documentation cleanup
- `hooks`: A hooks object, keyed by hook name - `hookName`: A hook name - `handlers`: The handlers for a single hook - All top-level and inner (returned) functions have names.
Configuration menu - View commit details
-
Copy full SHA for 78acfe1 - Browse repository at this point
Copy the full SHA 78acfe1View commit details -
Make
hasAction
andhasFilter
return the number of registered hooksThis is different than PHP, because the existing PHP API that these functions accept a callback and return its priority won't work well in JavaScript. Instead, when we implement namespaced hooks, these functions should work the same way: return the number of handlers registered under the given hook and namespace.
Configuration menu - View commit details
-
Copy full SHA for 637af4d - Browse repository at this point
Copy the full SHA 637af4dView commit details -
Remove unnecessary
describe
/it
pairsJust replace them with `test` instead, per the Jest examples.
Configuration menu - View commit details
-
Copy full SHA for b7b30f4 - Browse repository at this point
Copy the full SHA b7b30f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for b351db4 - Browse repository at this point
Copy the full SHA b351db4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 498e15b - Browse repository at this point
Copy the full SHA 498e15bView commit details -
2
Configuration menu - View commit details
-
Copy full SHA for e3392c3 - Browse repository at this point
Copy the full SHA e3392c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 53294fd - Browse repository at this point
Copy the full SHA 53294fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 07b61a0 - Browse repository at this point
Copy the full SHA 07b61a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee303e6 - Browse repository at this point
Copy the full SHA ee303e6View commit details -
Remove remaining per-test cleanup logic
This is all handled in `beforeEach` now.
Configuration menu - View commit details
-
Copy full SHA for b1251e3 - Browse repository at this point
Copy the full SHA b1251e3View commit details -
Merge branch 'add-wp-hooks' of github.com:adamsilverstein/packages in…
…to add-wp-hooks
Adam Silverstein committedJul 20, 2017 Configuration menu - View commit details
-
Copy full SHA for 93998e1 - Browse repository at this point
Copy the full SHA 93998e1View commit details -
Add webpack and build wp-hooks for core
Adam Silverstein committedJul 20, 2017 Configuration menu - View commit details
-
Copy full SHA for 7eda5e2 - Browse repository at this point
Copy the full SHA 7eda5e2View commit details -
remove built file and adjust build path
Adam Silverstein committedJul 20, 2017 Configuration menu - View commit details
-
Copy full SHA for 0e9986a - Browse repository at this point
Copy the full SHA 0e9986aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c9890db - Browse repository at this point
Copy the full SHA c9890dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for de6efd7 - Browse repository at this point
Copy the full SHA de6efd7View commit details -
Configuration menu - View commit details
-
Copy full SHA for ad47998 - Browse repository at this point
Copy the full SHA ad47998View commit details -
Merge branch 'add-wp-hooks' of github.com:adamsilverstein/packages in…
…to add-wp-hooks
Adam Silverstein committedJul 20, 2017 Configuration menu - View commit details
-
Copy full SHA for e217d7f - Browse repository at this point
Copy the full SHA e217d7fView commit details -
Adam Silverstein committed
Jul 20, 2017 Configuration menu - View commit details
-
Copy full SHA for 562cf37 - Browse repository at this point
Copy the full SHA 562cf37View commit details
Commits on Jul 21, 2017
-
Adam Silverstein committed
Jul 21, 2017 Configuration menu - View commit details
-
Copy full SHA for f882313 - Browse repository at this point
Copy the full SHA f882313View commit details -
rename ‘current’ => ‘__current’ and make it a stack
Adam Silverstein committedJul 21, 2017 Configuration menu - View commit details
-
Copy full SHA for 9eeb198 - Browse repository at this point
Copy the full SHA 9eeb198View commit details -
Add initial readme based on https://github.com/adamsilverstein/WP-JS-…
Adam Silverstein committedJul 21, 2017 Configuration menu - View commit details
-
Copy full SHA for fd0ccd3 - Browse repository at this point
Copy the full SHA fd0ccd3View commit details -
test remove a filter callback of lower priority when running hook
Adam Silverstein committedJul 21, 2017 Configuration menu - View commit details
-
Copy full SHA for fc48fbf - Browse repository at this point
Copy the full SHA fc48fbfView commit details -
test remove a filter callback of same priority when running hook
Adam Silverstein committedJul 21, 2017 Configuration menu - View commit details
-
Copy full SHA for 566af31 - Browse repository at this point
Copy the full SHA 566af31View commit details -
prevent and test for (dingle level) hook recursion
Adam Silverstein committedJul 21, 2017 Configuration menu - View commit details
-
Copy full SHA for 6ce6268 - Browse repository at this point
Copy the full SHA 6ce6268View commit details -
test remove a filter callback of higher priority when running hook
Adam Silverstein committedJul 21, 2017 Configuration menu - View commit details
-
Copy full SHA for 83dffa4 - Browse repository at this point
Copy the full SHA 83dffa4View commit details -
Failing recursive test: remove one hook in a callback before adding a…
…nother
Adam Silverstein committedJul 21, 2017 Configuration menu - View commit details
-
Copy full SHA for 2a60b9f - Browse repository at this point
Copy the full SHA 2a60b9fView commit details -
Add babel-loader for core build
Adam Silverstein committedJul 21, 2017 Configuration menu - View commit details
-
Copy full SHA for 79ef421 - Browse repository at this point
Copy the full SHA 79ef421View commit details
Commits on Jul 24, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 742857a - Browse repository at this point
Copy the full SHA 742857aView commit details -
Configuration menu - View commit details
-
Copy full SHA for bf69f89 - Browse repository at this point
Copy the full SHA bf69f89View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd911d0 - Browse repository at this point
Copy the full SHA bd911d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for b802c1d - Browse repository at this point
Copy the full SHA b802c1dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e393d6 - Browse repository at this point
Copy the full SHA 4e393d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d0513c - Browse repository at this point
Copy the full SHA 5d0513cView commit details -
Configuration menu - View commit details
-
Copy full SHA for c11003c - Browse repository at this point
Copy the full SHA c11003cView commit details -
Remove
wp-hooks.js
entry pointThis logic needs to be generated by Webpack instead. Otherwise something like it will end up being duplicated and manually maintained for every module in this repo.
Configuration menu - View commit details
-
Copy full SHA for ad09872 - Browse repository at this point
Copy the full SHA ad09872View commit details -
Configuration menu - View commit details
-
Copy full SHA for a19fa3b - Browse repository at this point
Copy the full SHA a19fa3bView commit details -
Prevent hook names from starting with
__
This would break some of the library's internal functionality.
Configuration menu - View commit details
-
Copy full SHA for 0498ee8 - Browse repository at this point
Copy the full SHA 0498ee8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b8c5f3 - Browse repository at this point
Copy the full SHA 5b8c5f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6327a54 - Browse repository at this point
Copy the full SHA 6327a54View commit details -
Configuration menu - View commit details
-
Copy full SHA for dd10eab - Browse repository at this point
Copy the full SHA dd10eabView commit details -
Ensure that hook callbacks to remove are functions
This will need to change later, but for now we should still make sure we validate our expected inputs strictly.
Configuration menu - View commit details
-
Copy full SHA for 8be21e5 - Browse repository at this point
Copy the full SHA 8be21e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 70b3ebc - Browse repository at this point
Copy the full SHA 70b3ebcView commit details -
Configuration menu - View commit details
-
Copy full SHA for a3b4901 - Browse repository at this point
Copy the full SHA a3b4901View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6653227 - Browse repository at this point
Copy the full SHA 6653227View commit details -
First attempt at handling adding/removing callbacks during execution
Also allows recursion.
Configuration menu - View commit details
-
Copy full SHA for 2e9b96e - Browse repository at this point
Copy the full SHA 2e9b96eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 54f70c1 - Browse repository at this point
Copy the full SHA 54f70c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for afa92ea - Browse repository at this point
Copy the full SHA afa92eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0919ab9 - Browse repository at this point
Copy the full SHA 0919ab9View commit details
Commits on Jul 25, 2017
-
Merge branch 'add-wp-hooks' of github.com:adamsilverstein/packages in…
…to add-wp-hooks
Adam Silverstein committedJul 25, 2017 Configuration menu - View commit details
-
Copy full SHA for d319b9d - Browse repository at this point
Copy the full SHA d319b9dView commit details
Commits on Aug 1, 2017
-
Add a centralized webpack folder based build for packages
Adam Silverstein committedAug 1, 2017 Configuration menu - View commit details
-
Copy full SHA for 90942a7 - Browse repository at this point
Copy the full SHA 90942a7View commit details
Commits on Aug 8, 2017
-
Add check: the hook name can only contain numbers, letters and unders…
…cores
Adam Silverstein committedAug 8, 2017 Configuration menu - View commit details
-
Copy full SHA for e2547d9 - Browse repository at this point
Copy the full SHA e2547d9View commit details -
use yoda conditional as per wp coding standards
Adam Silverstein committedAug 8, 2017 Configuration menu - View commit details
-
Copy full SHA for cefc79a - Browse repository at this point
Copy the full SHA cefc79aView commit details
Commits on Aug 11, 2017
-
removeHook - accept a namespace parameter and use it to identify item…
… for removal
Adam Silverstein committedAug 11, 2017 Configuration menu - View commit details
-
Copy full SHA for ca95500 - Browse repository at this point
Copy the full SHA ca95500View commit details -
addHook - The hook name can only contain numbers, letters and undersc…
…ores
Adam Silverstein committedAug 11, 2017 Configuration menu - View commit details
-
Copy full SHA for cc8b852 - Browse repository at this point
Copy the full SHA cc8b852View commit details -
addHook - accept a namespace parameter and store in handler data
Adam Silverstein committedAug 11, 2017 Configuration menu - View commit details
-
Copy full SHA for 06ddd95 - Browse repository at this point
Copy the full SHA 06ddd95View commit details -
Adam Silverstein committed
Aug 11, 2017 Configuration menu - View commit details
-
Copy full SHA for edd46d0 - Browse repository at this point
Copy the full SHA edd46d0View commit details -
Ensure the passed namespace is a string of the form `my-plugin-slug/f…
…unctionDescription
Adam Silverstein committedAug 11, 2017 Configuration menu - View commit details
-
Copy full SHA for 77be5ed - Browse repository at this point
Copy the full SHA 77be5edView commit details -
Add a build-modules command to run webpack
Adam Silverstein committedAug 11, 2017 Configuration menu - View commit details
-
Copy full SHA for 2c62cdc - Browse repository at this point
Copy the full SHA 2c62cdcView commit details -
Add a
validateNamespace
helper, centralizing namespace checksAdam Silverstein committedAug 11, 2017 Configuration menu - View commit details
-
Copy full SHA for 581e715 - Browse repository at this point
Copy the full SHA 581e715View commit details -
Add a
validateHookName
helper, centralizing hookName validationAdam Silverstein committedAug 11, 2017 Configuration menu - View commit details
-
Copy full SHA for 4c7f252 - Browse repository at this point
Copy the full SHA 4c7f252View commit details -
Use new hookName and namespace validation helpers throughout generato…
…rs for each hookName/namespace use
Adam Silverstein committedAug 11, 2017 Configuration menu - View commit details
-
Copy full SHA for ef06958 - Browse repository at this point
Copy the full SHA ef06958View commit details -
Update tests to use namespaces
Adam Silverstein committedAug 11, 2017 Configuration menu - View commit details
-
Copy full SHA for 319a023 - Browse repository at this point
Copy the full SHA 319a023View commit details -
Update readme with new hook/namespace signature
Adam Silverstein committedAug 11, 2017 Configuration menu - View commit details
-
Copy full SHA for 4ece207 - Browse repository at this point
Copy the full SHA 4ece207View commit details
Commits on Aug 12, 2017
-
Improve validateNamespace and validateHookName inline docs
Adam Silverstein committedAug 12, 2017 Configuration menu - View commit details
-
Copy full SHA for aa709ac - Browse repository at this point
Copy the full SHA aa709acView commit details -
require a non-empty string when validating namespace/hookName
Adam Silverstein committedAug 12, 2017 Configuration menu - View commit details
-
Copy full SHA for a8628a0 - Browse repository at this point
Copy the full SHA a8628a0View commit details -
Adjust expected error language in tests.
Adam Silverstein committedAug 12, 2017 Configuration menu - View commit details
-
Copy full SHA for 242f351 - Browse repository at this point
Copy the full SHA 242f351View commit details -
Improved regexes for hookName and namespace validation
Adam Silverstein committedAug 12, 2017 Configuration menu - View commit details
-
Copy full SHA for d8af28f - Browse repository at this point
Copy the full SHA d8af28fView commit details -
Add more tests around hookName and namespace validation
Adam Silverstein committedAug 12, 2017 Configuration menu - View commit details
-
Copy full SHA for 650e9e2 - Browse repository at this point
Copy the full SHA 650e9e2View commit details
Commits on Aug 16, 2017
-
Validate namespace takes form
vendorName/pluginName/functionName
Adam Silverstein committedAug 16, 2017 Configuration menu - View commit details
-
Copy full SHA for a617214 - Browse repository at this point
Copy the full SHA a617214View commit details -
Update tests with new namespace format
Adam Silverstein committedAug 16, 2017 Configuration menu - View commit details
-
Copy full SHA for 30e5e82 - Browse repository at this point
Copy the full SHA 30e5e82View commit details -
update readme with new namespace format
Adam Silverstein committedAug 16, 2017 Configuration menu - View commit details
-
Copy full SHA for 3a13768 - Browse repository at this point
Copy the full SHA 3a13768View commit details
Commits on Aug 17, 2017
-
remove module build from branch
Adam Silverstein committedAug 17, 2017 Configuration menu - View commit details
-
Copy full SHA for 7c1fc29 - Browse repository at this point
Copy the full SHA 7c1fc29View commit details
Commits on Sep 4, 2017
-
Correct namespace strings in docblocks
Adam Silverstein committedSep 4, 2017 Configuration menu - View commit details
-
Copy full SHA for 45747e5 - Browse repository at this point
Copy the full SHA 45747e5View commit details
Commits on Sep 7, 2017
-
Add args to applyFilters docs in readme
Adam Silverstein committedSep 7, 2017 Configuration menu - View commit details
-
Copy full SHA for a24847b - Browse repository at this point
Copy the full SHA a24847bView commit details -
camelCase for readme variable names
Adam Silverstein committedSep 7, 2017 Configuration menu - View commit details
-
Copy full SHA for 9f4cefc - Browse repository at this point
Copy the full SHA 9f4cefcView commit details
Commits on Sep 12, 2017
-
update hook and
vendor/plugin/function
wording, removingName
Adam Silverstein committedSep 12, 2017 Configuration menu - View commit details
-
Copy full SHA for 73744fa - Browse repository at this point
Copy the full SHA 73744faView commit details
Commits on Sep 13, 2017
-
complte namespace shortening to
vendor/plugin/function
Adam Silverstein committedSep 13, 2017 Configuration menu - View commit details
-
Copy full SHA for 7465667 - Browse repository at this point
Copy the full SHA 7465667View commit details