-
Notifications
You must be signed in to change notification settings - Fork 17
Refactoring hook callback methods #23
base: main
Are you sure you want to change the base?
Conversation
|
I'm in doubt about the It's used to decide between article or preprint, and me and @iudiz were inspired on the Any suggestion of a better name for this variable? |
|
The correct generic term for |
|
Either is sensible to me! |
|
Alec, Today we have these hooks: It would be interesting to have an alternative to simplify the plugins that use these mentioned, for example: and paperbuzz/PaperbuzzPlugin.inc.php Lines 45 to 47 in c6a9133
Do you think of a good way to avoid these repetitions? For example, a generic hook that can be used instead of one per application? If you find it interesting, we can send you a PR. |
We did the commit, renaming the variable. |
Yes, this would be good to do -- a generic hook for all 3 applications -- but we haven't done that yet because if we just rename the hook it'll be painful for 3rd-party users of the existing hooks to discover why parts of their plugins suddenly stopped working. One approach that could work would be to add a new application-independent hook and then mark the current hooks in the code as deprecated. We can document the deprecation in the Release Notebook. If you'd like to give that a crack, it would be welcome! |
Remove duplications on OJS/OPS metrics visualization. Rename variables to be more generic, instead of OJS specific terms (article).
Turn methods
articleMainCallbackandpreprintMainCallbackintopublicationMainCallback.Update variable 'article' to 'publication'.