Skip to content

Commit

Permalink
Merge pull request #1199 from amandafrench/hooklist
Browse files Browse the repository at this point in the history
Hook list updates from PKP sprint
  • Loading branch information
emmauhl authored Jun 21, 2024
2 parents 7841952 + 54f9231 commit fb262cd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ group :jekyll_plugins do
gem 'jekyll-readme-index'
gem 'jekyll-sitemap'
end

gem "webrick", "~> 1.8"
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ GEM
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.8.0)
webrick (1.8.1)

PLATFORMS
ruby
Expand All @@ -80,6 +81,7 @@ DEPENDENCIES
jekyll-seo-tag
jekyll-sitemap
jekyll-titles-from-headings
webrick (~> 1.8)

BUNDLED WITH
2.1.4
2.5.10
3 changes: 2 additions & 1 deletion dev/documentation/3.3/en/utilities-hooks.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
book: dev-documentation
version: 3.3
showPageTOC: true
title: Hooks - Technical Documentation - OJS|OMP|OPS 3.3
---

Expand Down Expand Up @@ -102,7 +103,7 @@ Hooks are most commonly used in generic plugins. Calling hooks from other types

The following is a list of the most common hooks that can be used.

> This is an incomplete list. Search the application code for `HookRegistry::call` to get a complete list.
> This is an incomplete list. Search the [application code](https://github.com/pkp/ojs/tree/stable-3_3_0) for `HookRegistry::call` to get a complete list of hooks available in OJS 3.3.
{:.warning}

### Request, Routing and Templating
Expand Down
3 changes: 2 additions & 1 deletion dev/documentation/en/utilities-hooks.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
book: dev-documentation
version: 3.4
showPageTOC: true
title: Hooks - Technical Documentation - OJS|OMP|OPS
---

Expand Down Expand Up @@ -106,7 +107,7 @@ Hooks are most commonly used in generic plugins. Calling hooks from other types

## Common Hooks

The following is a list of the most common hooks that can be used. Find all of the hooks in the application by searching for `Hook::call` in the code.
> This is an incomplete list. Search the [application code](https://github.com/pkp/ojs) for `HookRegistry::call` to get a complete list of hooks available in OJS 3.4.
{:.warning}

### Request, Routing and Templating
Expand Down
6 changes: 6 additions & 0 deletions ojs-2-technical-reference/en/hook_list.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Hook List

> This hook list is out of date. Some hooks may not work with newer versions of OJS. Please consult [v3.3 Common Hooks](/dev/documentation/3.3/en/utilities-hooks#common-hooks) and [v3.4 Common Hooks](/dev/documentation/en/utilities-hooks#common-hooks) for currently supported hooks.
{:.warning}

The following list describes all the hooks built into OJS as of release 2.1. Ampersands before variable names (e.g. ``&$sourceFile``) indicate that the parameter has been passed to the hook callback in the parameters array by reference and can be modified by the hook callback. The effect of the hook callback's return value is specified where applicable; in addition to this, the hook callback return value will always determine whether or not further callbacks registered on the same hook will be skipped.

**Table 5.2. Hook List**

> This hook list is out of date. Some hooks may not work with newer versions of OJS. Please consult [v3.3 Common Hooks](/dev/documentation/3.3/en/utilities-hooks#common-hooks) and [v3.4 Common Hooks](/dev/documentation/en/utilities-hooks#common-hooks) for currently supported hooks.
{:.warning}

| Name | Parameters | Description |
| ----- | ----- | ----- |
| `LoadHandler` | `&$page`, `&$op`, `&$sourceFile` | Called by OJS's main `index.php`{.filename} script after the page (`&$page`), operation (`&$op`), and handler code file (`&$sourceFile`) names have been determined, but before `$sourceFile` is loaded. Can be used to intercept browser requests for handling by the plugin. Returning `true` from the callback will prevent OJS from loading the handler stub in `$sourceFile`.
Expand Down

0 comments on commit fb262cd

Please sign in to comment.